• prachi thale
  • NEWBIE
  • 15 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I have a page detail button the is designed to execute javascript when clicked, resulting in a custom checkbox becoming marked "true" and the page refreshing/reloading.

Here is the code I am currently working with:
 
{!REQUIRESCRIPT("/soap/ajax/31.0/connection.js")}

//declare the varaiable that will hold all the information
var newRecords = [];

var opp = new sforce.SObject("Opportunity");
opp.Id = '{!Opportunity.Id}';
opp.Manager_Followed_Opportunity__c = '1';

//push the information through
newRecords.push(opp);

//save the change
result = sforce.connection.update([opp]);

//refresh the page
window.location.reload();

I cannot get the box to become marked true (I have already tried  changing 
opp.Manager_Followed_Opportunity__c = '1'; to = true/True/'True'/'true' with no success.)

Thank you in advance for any help you can provide!
  • December 09, 2014
  • Like
  • 0
HI All,
         I am Begginer of salesforce,I have  Create one Master field to One object(xxx) to another Object(yyyy).Now I dont want master Detail filed. So,How To Delete that master Field.??

Advance Thanks