You need to sign in to do that
Don't have an account?
devendra dhaka
Custom Detail page button coding
I have to write down a Detail page button which will be fetching information from the current record and will be updating another custom object .
'm able to find information on List Page Buttons , but nothing for this :(
Any help will be appreciated :)
I have created a code to achieve some functionality. I have to fetch a record based on some requirement from another custom object.
How to write a SOQL query in this code ??
{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")}
var newRecords = [];
var c = new sforce.SObject("Leave_Application__c");
c.id ="{!Leave_Application__c.Id}";
c.Application_Status__c = "Rejected";
newRecords.push(c);
result = sforce.connection.update(newRecords);
if (result[0].success=='false') {
alert(result[0].errors.message);
} else {
location.reload(true);}
Here is a sample query which can be used from the detail page -
result = sforce.connection.query("Select Id, Name from Account");
Hi Sanjay,
I tried that
but in my case when fetching ID from the custom object instead of a proper id field its giving me EXT-GEN1
Why is that happening ??
I am not sure if i am getting your issue here, can you elaborate and put code snippet in for troubleshooting.