0

I have submit for Approval button in Lightning community which is a quick action button calling a VF page. enter image description here

QuickAction: enter image description here The VF code:

<apex:page showHeader="false" sidebar="false" standardController="<customObject>">
    <script type="text/javascript">
        alert("Approval process is submitted..!!!! ");
        var varRec = new sforce.SObject('customobject__c');
        varRec.id = '{!customobject__c.Id}';
        varRec.Status__c = "Submitted";
        result = sforce.connection.update([varRec]);
        location.reload(true);
    </script>
</apex:page>

Issue is i am seeing one more popup window and javascript update statement is not getting executed. I need help fixing this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.