
{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")}
if ('{!Sales_Order__c.Status__c}' == 'Ready for Review' ) {
sforce.apex.execute("CreateOrder","SendApprovalRequest", {orderid:"{!Sales_Order__c.Id}"});
alert('Record sent for approval');
window.location.reload();
}
else{
alert('You can not Submit for Approval when status is in Draft');
}
3 件の回答
Hello Arumugam,
This Answers Community is focused on configuration and design questions.
Any questions related to java scrpit are best submitted at the developer forums
You ETA will be Quick in those Forums
Please use below links
https://developer.salesforce.com/forums/#!/feedtype=RECENT&criteria=ALLQUESTIONS
https://developer.salesforce.com
http://salesforce.stackexchange.com/
Hope this helps,
If it does, please mark as best answer.
Kind Regards,
Jaya