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

Can you call s-control from a trigger

Can you call s-control from a trigger?
I once saw a post where you could trigger an s-control via the Outbound Message on a workflow.

I am also (still) looking for that post.
S-Controls run in a browser, not on the server. You can't actually call an S-Control from a Workflow Rule, Apex Code, Apex Trigger, or any other server-side technology. You'll have to either rewrite your S-Control logic into a trigger, or have the Outbound Message contact your application server and have that server perform the updates you're intending via the API. Either way, you still won't be triggering the S-Control directly as a result of that condition (that is, the server does not execute S-Control code).
You can update the checkbox field so that the next time the record is displayed on the screen (eg. immediately after clicking "Save"), a hidden (or not-hidden) S-Control on the page layout could detect that checkbox and execute code. Either way, the S-Control isn't called from the trigger or workflow rule, but can be triggered the next time the page is viewed as the result of such modifications.

~ sfdcfox ~