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
lee.boonstralee.boonstra 

invoke S-control by selecting a customn checkbox

I'm wanting to split my opportunity form into 2 pieces, so I can make a field dependency
for one controlling checkbox to a different form.

So I made a form with one custom checkbox.
And a trigger which invokes before saving the opportunity form, and checks
if the checkbox is checked or not.

What I actually want is opening an S-Control.
But then I noticed that I can't open an s-control through the API? Correct?
Then I was thinking about opening an browser popup, but that does not seem
to work for a trigger? Correct?

Is it possible to open with a trigger a piece of AJAX code?
Or is there an other possible way to open a S-Control by checking
if a custom checkbox is selected or not.


Thanks in advance,

Lee

claudiomclaudiom
Hi Lee,

I think is not possible to invoke user interface code from triggers/apex code. This is good because this way you don' t mix user interface code in the business layer(apex code). To solve your problem, I think you need to override the new button and provide a customized edit screen(S-control) for the opportunity. This way you can go to a different form based on the checkbox.

I holpe this help.


lee.boonstralee.boonstra
Thanks! I'm working on it right now.