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
mahamed raheemmahamed raheem 

CPQ contract amending issue on quote object delete permission

Am doing contract amending using salesforce provided Contract Amender API, While doing contract amending Quote object is required to delete permissions.
in my scenario, some of the users are not having Quote delete permission and we can't give the delete permissions for those users.
As per the salesforce provided documentation Delete on quote object permission is required.
Please help me on this issue Are there any alternative solutions for bypass the quote object delete permissions and run the contract amending.

Please find below the apex code:


public  class ContractAmender {
    public QuoteModel load(String contractId) {
        String quoteJSON = SBQQ.ServiceRouter.load('SBQQ.ContractManipulationAPI.ContractAmender', contractId, null);
        return (QuoteModel) JSON.deserialize(quoteJSON, QuoteModel.class);
    }
}
             
             ContractAmender amender = new ContractAmender();
               // QuoteModel quote = amender.load(sub.contract);
               QuoteModel quote = amender.load('8003C0000006fWi'); // passing contract Id


thanks in advance

 
ShirishaShirisha (Salesforce Developers) 
Hi Raheem,

Greetings!

Unfortunately,there is no other alternative solution other than giving the delete permission to users to allow them to delete the quote record.

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Regards,
Shirisha Pathuri