Salesforce custom button (JavaScript execution), click the button update filed

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.