function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Uttpal chandraUttpal chandra 

Approval process not working

I all i have created a Approval process  in salesforce and it is working fine with standard page but when i had put custom vf page in Edit button it is not working correctly.

When i had submit the record for approval it is still editing the record when i am using custom VF page and also it is still editing the record after it is approved
NagendraNagendra (Salesforce Developers) 
Hi Uttpal,

Sorry for this issue you are facing.

It sounds like your VF page needs to check whether the record is locked before allowing to edit the fields.

I recommend checking the Approval namespace (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_approval.htm), which contains functions to check whether or not a record is locked.

Regards,
Nagendra