You need to sign in to do that
Don't have an account?
Grant270
Custom Button Help?
I'm trying to create my first s-control. It's used in a button to update the lead status to dead. My for the control is:
{!URLFOR($Action.Lead.Edit, Lead.Id,[retURL=URLFOR( $Action.Lead.View , Lead.Id ),lead.Status ="Dead", save=1] )}
type is URL.
It is not thowing an error, it just isn't updating the field. Any reason this shouldn't work?
{!URLFOR($Action.Lead.Edit, Lead.Id,[retURL=URLFOR( $Action.Lead.View , Lead.Id ),lead.Status ="Dead", save=1] )}
type is URL.
It is not thowing an error, it just isn't updating the field. Any reason this shouldn't work?
I played around with it and managed to get it working by referring to the DOM ID of the Status field, rather than the name of "Status":
I also saw this being used on another developer board post by mtbclimber.
Nice stuff. I'm starting to brim over with ideas of how this type of functionality can be used!
John Rotenstein
Sydney, Australia
Hi,
I am working on something very similar. I want to create a button that updates the status on a custom object - Sales Quote to "Sent"
It is my first S-control - so I am not very knowledgable.
Here's what I tried:
This was just to try it out first, and since I was not using the DOM ID, I didn't expect it to work. I tried again using the DOM ID for my custom field:
But I am not able to save this as an S-control because I get a sytax error telling me that I am missing the field name for my Status field.
Can you please help?!?
Thanks!!!
-Brandy
It seems to be a quirk with the URLFOR syntax checking your parameters and if they begin with a number then it assumes it’s some sort of field and tries to resolve it but can’t? If the field begins with a letter like “opp11” (which is the case with standard fields) it doesn’t trigger this quirk so that's why custom fields fail.
The workaround I have is to move the custom field parameter outside the URLFOR formula, e.g.
{!URLFOR($Action.Applicants__c.Edit,Applicants__c.Id,[retURL=URLFOR($Action.Applicants__c.View,Applicants__c.Id),save=1])}&00N50000001eVzV=abc123