Recently I installed the Pivotal CRM Web Service Generator (WSG) tool provided by CDC Software. With the tool, I quickly generated web services for an integration service I built between a custom developed finance application and Pivotal CRM.
Installation
Installing WSG includes an RDF import. The RDF import is required to generate the web service. The RDF import is not required to provide functionality to the web service after the web service is created.
WSG requires the security group 'Relationship Administrator' to successfully generate a web service. If the 'Relationship Administrator' security group is missing, as it was for the Financial Services vertical I support, it can be imported from the out-of-the-box business module (BM). Export the security group using the Toolkit Transporter and import it into the target BM.
Implementation
WSG can generate a Visual Studio .NET 2003 project containing the web service methods and a class for the Active/Rich Client form. The methods can include Insert, Update, and Delete. The class representing the form contains fields for the form's primary field values. Some primary fields may be missing in the class. To add the missing fields, either customize the generated web service or pass the missing field names and their values as a string array parameter. If you pass a parameter you handle it as usual in the form's server rule.
Unfortunately, WSG web services do not support secondary form segments and fields. Since WSG web services use the Pivotal CRM XML Interface, it is feasible to customize the generated web service to process secondary fields. I chose to leave the code as-is and not customize it. Instead, I created another web service to process the secondary fields using the secondary's Active/Rich Client form. For the integration service, I have the the web service for the secondary fields consumed after the web service for the primary fields.
Conclusion
Pivotal CRM Web Service Generator is a helpful tool for quickly generating web services that can insert, update, and delete Pivotal CRM records using the Pivotal CRM XML Interface.
As mentioned in the post, a WSG web service does not support secondary form segments and fields without customization. My approach was to create additional web services to process the secondary form segments and fields. To process an item, I first consumed the primary record web service, followed by consuming the secondary record web services. In most situations, the primary-to-secondary order should work as intended. Inserting a primary record first will provide the required record-id to associate the item's secondary records.
ReplyDeleteBut what if an item is inserted and a primary field depends on a secondary record? For example, let's say there is a primary field that summarizes the item and its value contains a concatenation of primary and secondary field values. And, the concatenation is performed by a method in the parent form server rule when inserting the item. This is the situation I was presented for the integration service I built.
The first approach I thought of was invoking the Execute method. The Execute method could then call the server rule method which concatenates the primary and secondary field values. This is the standard approach for executing a method in a form server rule by a client. But, unfortunately, this was not possible. WSG web services do not support calling a form server rule Execute method.
As with customizing the WSG web service to support secondary form segments and fields, it is also possible to customize the generated web service to call a form server rule Execute method. The Pivotal CRM XML Interface implements the Execute command. But, once again, I wanted to leave the WSG web service code as-is and not customize it.
The best approach I was left with was to consume the primary record web service once again after inserting the item and invoking the Update method. Updating an item, like inserting an item, calls the server rule method which concatenates the primary and secondary field values. At this point, the item's secondary records are available, therefore the primary field value is set as expected.
Martin Richards was so kind to offer me his document on using Pivotal Web Services Generator. He gave me permission to post it here and share it with you. He can be contact at martinontheroad@gmail.com .
ReplyDeleteMartin took a different approach than I did. The approach in my original post reuses an already implemented form and ASR, enforcing Pivotal CRM application workflow. Martin's approach creates a new form and ASR, implementing specific structures and workflow. Either approach is suitable. Requirements dictate the best approach.
The document also includes some tips to issues that may arise.
http://gmoyano.com:1080/Guide%20to%20Pivotal%206%200%20Web%20Services%20With%20Pivotal%20Web%20Services%20Generator%20V2.pdf
Hi, very good blog. I tried to download the document, but i can't. Could send me the pdf to email josejhon@gmail.com.
ReplyDeleteThanks a lot!.
Jose, thanks for the complement!
DeleteI moved the document Martin provided way back then to:
http://1drv.ms/1ombHj4
Anyone can access it from this public location.
Hi George,
ReplyDeleteI have some issues to consume pivotal web service. Could you please provide me any help document . I tried to download the document, but not succeed. my email ID is umeshsati.2009@gmail.com
Thanks in advance.
Great work! That is the kind of information that are meant to be shared around the net. Disgrace on the seek engines for now not positioning this submit higher! Come on over and talk over with my site . Thank you =)
ReplyDeletebest selling products on ebay
This comment has been removed by the author.
ReplyDeleteCan anyone recommend me the best service from the list mentioned in this site. CRM For Freelancers
ReplyDelete