views:

204

answers:

2

I have an existing Workflow Rule that fires of a (SOAP) Outbound Message when a certain type of object is created or updated. That works fine.

I want to extend it so that a similar Outbound Message is also sent when the objects are deleted.

According to this discussion, Workflow Rules cannot be made to fire based on object deletions, so I have to write an Apex Trigger instead.

So the question is, how do I kick off a SOAP Outbound Message from within Apex?

+3  A: 

Real "Outbound Message" (created as an entity somewhere in application Setup, with merge fields etc.) - no idea.

Your own HTTP request where you define your own endpoint as well as payload that might be a valid SOAP envelope - have a look here and here for a start.

eyescream
+2  A: 

It should be quite simple - as long as SF supports your web services SOAP version. Import the WSDL for the service (you can do this from the 'Apex Classes' page) and add an appropriate trigger type that calls the WSDL defined method(s).

weesilmania
This is what I did in the end, thanks.
codeulike