• Mahendar Manupati
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi ,
Here is the code for javascript button.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var records = result.getArray("records");
var f = new sforce.SObject("Appointment__c");
f.id = "{!Appointment__c.Id}";
f.Fini_Status__c = "Appt Canceled";
var user = sforce.connection.getUserInfo();
f.Cancelled_By__c =user.getuuserid;
f.Cancelled_Date_Time__c=new Date().toISOString();
sforce.connection.update([f]);
Hi ,
Here is the code for javascript button.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var records = result.getArray("records");
var f = new sforce.SObject("Appointment__c");
f.id = "{!Appointment__c.Id}";
f.Fini_Status__c = "Appt Canceled";
var user = sforce.connection.getUserInfo();
f.Cancelled_By__c =user.getuuserid;
f.Cancelled_Date_Time__c=new Date().toISOString();
sforce.connection.update([f]);