You need to sign in to do that
Don't have an account?
CUAdmin
Passing on IDs to an external web service from salesforce triggers
Hello: I am a newbie in dev forum and would appreciate some guidance in automating something for our organization. We need to store a list of salesforce object ids in our native sql server database. Thinking of this approach below:
- Create a trigger upon record deletions to pass on the deleted record ID to a web service hosted at our production platform
- The web service will take the id and save in our sql db
Question #1: Is there a better approach to automate our needs? If so please advise.
Question #2: If the web service based approach above is a good one too then in that case kindly give me some guidance on how to proceed. I know the basics of the trigger but not sure about the syntax of a web service call, specially does the web service need to be created WSDL etc.?
Thanks very much in advance.
- Create a trigger upon record deletions to pass on the deleted record ID to a web service hosted at our production platform
- The web service will take the id and save in our sql db
Question #1: Is there a better approach to automate our needs? If so please advise.
Question #2: If the web service based approach above is a good one too then in that case kindly give me some guidance on how to proceed. I know the basics of the trigger but not sure about the syntax of a web service call, specially does the web service need to be created WSDL etc.?
Thanks very much in advance.
1.) A better approach would be to use the data replication feature provided by the Salesforce SOAP API, using the getDeleted() call. You can find more details here: https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_getdeleted.htm
2.) If you want to go the trigger way, this page will help you with writing your web service callout class which can be invoked by triggers: https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.
Thanks,
Shashank
1.) A better approach would be to use the data replication feature provided by the Salesforce SOAP API, using the getDeleted() call. You can find more details here: https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_getdeleted.htm
2.) If you want to go the trigger way, this page will help you with writing your web service callout class which can be invoked by triggers: https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.
Thanks,
Shashank