Salesforce: Fire Outbound SOAP Message Using Apex

I have an existing workflow rule that triggers or updates a specific object type (SOAP) Outbound message . This works great.

I want to expand it so that a similar outgoing message is also sent when objects are deleted.

As per this discussion , Workflow rules cannot be created for fire based object removal, so I need to write an Apex Trigger instead.

So the question is, how can I trigger an outbound SOAP message from Apex?

+2


a source to share


3 answers


This should be pretty straightforward - as long as SF supports your version of SOAP for web services. Import the WSDL for the service (you can do this in the Apex Classes page) and add an appropriate trigger type that calls the method (s) defined by the WSDL.



+3


a source


I'm new to here, so I can't add a comment to weesilmania's post, but I wanted to point out something important. The outbound messaging feature in salesforce is pretty bearable and reliable. If the endpoint goes down for a while, or if the network connection between the merchant and your server is rough, salesforce will retry the outbound outbound message within 24 hours.



Doing the vertex alignment that happens on the trigger will work, but it gets fired and forgotten. Keep this in mind if you use this option.

+4


a source


The real "Outbound message" (created as an object somewhere in the "Setup" application, with merge fields, etc.) - I don't know.

Your own HTTP request, in which you define your endpoint, as well as a payload that might be a valid SOAP envelope - take a look here and here to get started.

+3


a source







All Articles