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

Custom Button

Hi All,


We would like to change how an order (case) is handled.  Right now, an order is saved and closed.  The act of closing the order sends it to our parts department. 


We'd like to change that process.  I'm looking to create a custom button that updates a custom field and saves the case.


Clicking on the button would:


1) Update the custom picklist field "Order_Submission_Status__c" with the value "Submitted"

2) Save the part order (case).

3) Display an alert that the order was submitted to the Parts Department.


Can someone point me in the right direction?  I am a Salesforce admin, but not even remotely close to a programmer!






Best Answer chosen by Admin (Salesforce Developers) 

Ya, Javascript on button click will do

All Answers

Rahul SharmaRahul Sharma
Hi, you would need to execute onclick javascript code on button click of the button.

Ya, Javascript on button click will do

This was selected as the best answer
Phil WaltonPhil Walton


Can I add to this, as I am trying to do similar... Just wanting a button that will update a field. Can you confirm the following for the new button:

Behavior - Execute JavaScript

Content Source - On Click JavaScript

Then what Code/Url should be added below? Is it something combining the Edit url and the field sure I have done it in the past but the memory is not what it used to be, haha

Much appreciated!!