You need to sign in to do that
Don't have an account?
uu
Apex method call using custom button
Hii Friends,
Please help me.
The below javascript code on custom detail page button shows error on click it.
--------------------------------------------------------------------------------------
{!REQUIRESCRIPT("/soap/ajax/47.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/47.0/apex.js")}
var tempID='{!Offers_Appraisals__c.Id}';
if({!Offers_Appraisals__c.Id}!=Null)
{
sforce.apex.execute("NanoHRSheet","HRSalarySheet",tempID);
}
--------------------------------------------------------------------------------------
Error:
What's wrong with code?
Please help me.
Thank you
Please help me.
The below javascript code on custom detail page button shows error on click it.
--------------------------------------------------------------------------------------
{!REQUIRESCRIPT("/soap/ajax/47.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/47.0/apex.js")}
var tempID='{!Offers_Appraisals__c.Id}';
if({!Offers_Appraisals__c.Id}!=Null)
{
sforce.apex.execute("NanoHRSheet","HRSalarySheet",tempID);
}
--------------------------------------------------------------------------------------
Error:
What's wrong with code?
Please help me.
Thank you
The blogs have similar queries and answers also provided in it.
Go through them once,
https://success.salesforce.com/answers?id=90630000000h7aMAAQ
https://salesforce.stackexchange.com/questions/172552/a-problem-with-the-onclick-javascript-for-this-button-or-link-was-encountered-m
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
All Answers
The blogs have similar queries and answers also provided in it.
Go through them once,
https://success.salesforce.com/answers?id=90630000000h7aMAAQ
https://salesforce.stackexchange.com/questions/172552/a-problem-with-the-onclick-javascript-for-this-button-or-link-was-encountered-m
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
sforce.apex.execute("Approval_Class","approval_Method",{someid:"{!Record.Id}"});
Hope this helps!
Prady01
It works:)
Regards
Anita Sodhi