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

Invoking an Scontrol

I have an Scontrol which is written to populate a custom field on my Contacts object page.The requirement is that whenever a contact is associated to an account(by using the look up help),my Scontrol should be triggered to populate the custom field.
Can anyone provide me some guidelines ?
Thanks & Regards,
VN -

Do you need to populate the custom field before the record is saved?  If not, why not use a workflow with a condition that there has to be a value for the relationship?

Hope this helps.


Hi Ricky,

Thank you for the reply.But the custom field has to be populated when the contact is associated to an account.This should be done before the record gets saved.

Can you please suggest how to get this done


Thanks & Regards,




Greg HGreg H
You can't add an sControl to the edit screen.  So you will not be able to trigger your sControl when the lookup action is performed.  You could add your sControl to the detail page and have the sControl triggered after an initial save or you could write an sControl to mimic the edit screen and that way you could control all actions taken including populating fields upon that lookup.
Krishna Prasad K PKrishna Prasad K P
Hi all,
I am also looking for a way to recreate the edit page to add some javascript snippets for interactive data inputs and too required before saving the record. Is there any method to catch the editpage as file into a variable using javascript, so that I can add snippets on that before rendering the page.
If there is a way, will that be secure to use?

Please provide me a solution

Thanks in advance,