Activity Forums Salesforce® Discussions What is the use of System.Approval.unlock() in Salesforce ?

  • Anuj

    Member
    August 26, 2020 at 2:26 pm

    Sometimes we have faced business requirement to Lock or Unlock records in Salesforce. We can use apex lock() and unlock() methods in the System. Approval namespace to lock and unlock records by passing in record IDs or sObjects.

  • Ratnesh

    Member
    August 26, 2020 at 2:31 pm

    The new Approval.UnlockResult class contains methods that show
    the results of record unlocks by System.Approval.unlock() methods.
    A Boolean value that is set to true if the unlock operation is successful
    for this object, or false otherwise.
    Boolean result = System.Approval.unlock(oppId).isSuccess();

  • Pooja

    Member
    August 26, 2020 at 3:46 pm

    The new Approval.UnlockResult class contains methods that showthe results of record unlocks by System.Approval.unlock() methods.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos