Learning salesforce for one months, the document also read a lot, but most of them did not delve into. Salesforce abroad a lot of documents, the previous Java Baidu can be a lot of solutions, now do Salesforce is to improve the ability of many Google search. Google a lot of things in China are to shield off, general search not what things, suggest Google browser upside down wall (attached Baidu a http://jingyan.baidu.com/article/c85b7a64562eac003bac95b1.html).
To create a custom button click Update Field:
1 Enter the Salesforce Development home page, no application for an account (estimated to create a custom button has a bar ~ ~), click on the upper right corner of the "Settings" button,
2 Click on "Create" >>> "Objects" >>> Find your target object by clicking in, find "buttons, links and actions" in the navigation bar, the page can also be found sliding,
3 Click "New button or link" and go to the edit screen as follows:
The code is as follows:
{! Requirescript ("/soap/ajax/27.0/connection.js")} var newrecords = []; var New Sforce. SObject ("Job_application__c") " //Instantiate a custom object ja.id =" {! Job_application__c.id} "; Gets the ID of the object ja. status__c="Extend an Offe";; Newrecords.push (ja); result = Sforce.connection.update (newrecords);//Update data Window.location.reload (); Load Display}
If the code does not respond, it may be a sign or version of the problem, then carefully tune it. Enclosed are two related blog posts abroad:
1 Https://success.salesforce.com/answers?id=90630000000ghvRAAQ
2 http://hometeamconsulting.com/update-records-javascript-buttons/
Next, you can add a custom button to the page layout in the object details, in the fourth picture you can see the page layout is in the navigation bar, click to enter,
Click on the Left "button", will appear on the right side of the custom button, drag him to the corresponding position is OK
Salesforce custom button (JavaScript execution), click the button update filed