You need to sign in to do that
Don't have an account?
rachvill
Re-using scontrol for different custom links
Hi,
I would like to develop an scontrol that will behave differently depending on what custom link is clicked.
To illustrate, I have two custom link - "Update SObject", "Delete SObject". If Update SObject is clicked, my scontrol will do an update. If Delete SObject is clicked, I would want the same scontrol to do a deletion instead.
I tried creating a custom link URL with my additional parameter (mode=Insert) and calling the scontrol from there, but it does not work the way I wanted it to work. When I clicked on the link, the whole saleforce window (inclunding headers and tabs) is displayed - so it displays the scontrol within salesforce within salesforce.
Does anybody have idea on how I can go about this? Any help will be very much appreciated.
Thanks.
Rachel
I would like to develop an scontrol that will behave differently depending on what custom link is clicked.
To illustrate, I have two custom link - "Update SObject", "Delete SObject". If Update SObject is clicked, my scontrol will do an update. If Delete SObject is clicked, I would want the same scontrol to do a deletion instead.
I tried creating a custom link URL with my additional parameter (mode=Insert) and calling the scontrol from there, but it does not work the way I wanted it to work. When I clicked on the link, the whole saleforce window (inclunding headers and tabs) is displayed - so it displays the scontrol within salesforce within salesforce.
Does anybody have idea on how I can go about this? Any help will be very much appreciated.
Thanks.
Rachel
Rachel,
It seems like you do not wish to create two s-controls (one for updating, and one for deleting) because it is a shame to have to maintain two seperate s-controls that have so much code in common.
If that is correct, then you can make use of 'snippets' in winter '07. Use a snippet to store and maintain the code common to both, and then have two seperate s-controls that have minimal lines that call the snippet to do updates or deletes. Then have your custom links call the proper of these two.
Hope this helps.