You need to sign in to do that
Don't have an account?
LeeC
Button, Text Field and Checkbox
Hello, I am trying to use a URL so when I click a custom button it places a tick in a checkbox and text in a text field. It then saves the record. I am trying to use:
https://na6.salesforce.com/{!Opportunity.Id}/e—retURL=%2F{!Opportunity.Id}&Opportunity.NP_New_Opp__c=1&save=1
Opportunity.NP_New_Opp__c is my checkbox field.
Once I get the Tickbox working I was going to try and add the text. Does anyone know what I am doing wrong?
Thanks
Try using the field ID instead of the name for Opportunity.NP_New_Opp__c .
Didnt work. Still comes up with "You have attempted to reach a URL that no longer exists on salesforce.com"
Do you have any more idea's?
Thanks
Try the following (will need to take your values rather than mine:
So replace the ID in there with your field ID instead.
I replaced your "&00N20000002iTsu" with my checbox value. This time when I click the button it takes me back to the default home page but the checkbox is not ticked.
https://na6.salesforce.com/{!Opportunity.Id }/e?save=1&00N80000004TdG7=1&retURL=%2F{!Opportunity.Id}
This is an opportunity so I guess I want to keep your Opportunity.id fields?
THanks again
Confirm the field ID is correct as i've tested this with a test checkbox, no spaces in the merge field either (that may just be the formatting in the forum here) .
What are the other options you have selected for the button in the edit page? (Is this button on the opportunity object or somewhere else?)
Thanks - I got it working, I wasnt using the correct field ID :smileysad:
Would you happen to know if it’s possible to get this to Update the field then create a new record. I have got both parts working separate but when I combine them in the button the page comes back with "Insufficient Privileges - You do not have the level of access necessary to perform the operation you requested"
This is the code im using:
https://na6.salesforce.com/{!Opportunity.Id}/e?save=1&00N80000004TdGC=1&retURL=%2F{!Opportunity.Id}
https://na6.salesforce.com/500/e?retURL=%2F500%2Fo&RecordType=01280000000Hdfy&ent=Case
&cas4={!Opportunity.Account}
&cas14={!Opportunity.Name}
&cas15={!Opportunity.Description}
I have tried removing the "&retURL=%2F{!Opportunity.Id}" of the end of the button check code.
Thanks :)
Right so I'm not fantastic with buttons but I've had a go at one here:
Obviously the above doesn't do your operation as I've written it specifly for my test case.
Try the above and tell me how you get on as this is a new thing for myself to try, there is probably a far better way to call the new record to the case object but I couldn't find one.
Heya LeeC, did this button help with you issue?
Hi Sporter, I was trying to figure out a way using only the html code to add the checkbox and open up a new object. I will post the solution if I figure it out.
Thanks for all your help
Guys,
you can use URLFOR and URLENCODE standard function while construction URL, which will insure for passing correct values to next page
Thanks,
Bala
I am new to this, would you please be able to give me an example on how I could join these two commands together?
This Ticks the checkbox and saves the Opportunity:
https://na6.salesforce.com/{!Opportunity.Id}/e?save=1&00N80000004TdGC=1&retURL=%2F{!Opportunity.Id}
Once this code is run it saves the opportunity and takes me back to the home object.
This Creates my new Case and brings the info from Opportunities
https://na6.salesforce.com/500/e?retURL=%2F500%2Fo&RecordType=01280000000Hdfy&ent=Case
&cas4={!Opportunity.Account}
&cas14={!Opportunity.Name}
&cas15={!Opportunity.Description}
Thanks :)
LeeC, the button code I wrote on an earlier post would do what you want , here it is modified to include the record type:
You'll need to change the myOpp.Check_This_c in the javascript to the API name of the checkbox field (in this example it is a checkbox but you could apply it to any field).
I know you want the URL version of it with merge fields etc but be aware this is a URL hack and if something were to go wrong and you contacted salesforce support they wouldn't help you with it.
Looking into combining the two urls I don't think it's possible in the way you want it as every time i've attempted to use a URL hack I run into trouble with one thing or another.