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
Ron_sf009Ron_sf009 

Calling Continuation Object (framework) from Trigger

I was planning to make a Continuation object callout form Trigger. I have a requirement to invoke asynch Webservice callout whenever records is created or updated. . Hence just wanted to know if it would be possible to make use of continuation object callout from Trigger.
Best Answer chosen by Ron_sf009
@Amit Kumar Giri@Amit Kumar Giri
>> Continuation callout can only be made from Visualforce action .
>> Beacuse continuation is a asyncronous callout and the response back with a callback method and After execution of callback method only data is presented back (presented back where ?????? to the viosualforce page).
>> Where as trigger is fire an forget principle. it neither can hold back response of call back method or prsented back. it will excute and move on.
>> so the continuation object method need to be called from a visualforce (JS remoting/actionfunction/method) and once exceution of callback done data will be sent back to page and display whereever u want in page.
If you want to know more about how u can make continuation from VF then there are some nice link u can go through
https://www.jitendrazaa.com/blog/tag/continuation/
http://amitsalesforce.blogspot.com/2018/05/callouts-from-visualforce-page.html