function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tf_ianrtf_ianr 

Fire a SOAP Outbound Message using Apex

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?

 

(If you want to earn some StackOverflow points, this question is also posted on StackOverflow)

tf_ianrtf_ianr

Thanks Srinvas, that looks like a useful example.

 

But is there a way I can make use of an existing "Outbound Message" in Salesforce and then just call that from code? That way all the soap stuff is done for me, rather than having to build up the soap at a low level.

sforce2009sforce2009

I am not sure about that. May be I can do some research there. Will get back to you if I get anything of that sort.