// 1. Define CPQ+AA objects (LCO + dependents) by hierarchy order for deletion String[] customLCOAndDependentObjects = new String[] { 'SBQQ__QuoteLinePricingGuidance__c','SBQQ__QuoteDocument__c','SBQQ__QuoteLineConsumptionRate__c','SBQQ__QuoteLineConsumptionSchedule__c','SBQQ__QuoteLine__c','SBQQ__QuoteLineGroup__c','SBQQ__Quote__c', 'SBQQ__PricingGuidanceTier__c','SBQQ__PricingGuidance__c', 'SBQQ__ErrorCondition__c','SBQQ__ConfigurationRule__c','SBQQ__ProductAction__c','SBQQ__ProductRule__c', 'SBQQ__LookupQuery__c','SBQQ__PriceCondition__c','SBQQ__PriceAction__c','SBQQ__PriceRule__c', 'SBQQ__LineColumn__c','SBQQ__TemplateSection__c','SBQQ__QuoteTemplate__c', 'SBQQ__SubscriptionConsumptionRate__c','SBQQ__SubscriptionConsumptionSchedule__c','SBQQ__SubscribedAsset__c','SBQQ__Subscription__c', 'sbaa__ApprovalSnapshot__c','sbaa__Approval__c', 'sbaa__ApprovalCondition__c','sbaa__ApprovalRule__c' }; // replace below with perm set id String permSetId = ''; ObjectPermissions[] profileObjPerms; // 2. Iterate and delete, so not all done in 1 batch for(String objName : customLCOAndDependentObjects) { // Query for object permissions by object profileObjPerms = [SELECT Id FROM ObjectPermissions where Parent.Id = :permSetId and SobjectType = :objName]; System.debug('Object perms for object:'+objName+':'+profileObjPerms.size()); try{ // Uncomment below line before executing // delete profileObjPerms; } catch(Exception e){ System.debug('Obj perms update failed due to the follow reason: '+ e + ',' + e.getStackTraceString()); } } // 3. Query to ensure all the relevant object perms are cleared ObjectPermissions[] objPerms = [SELECT Id FROM ObjectPermissions where Parent.Id = :permSetId and SobjectType = :customLCOAndDependentObjects]; System.debug('Rerun Object Perm Records for CPQ & AA: '+ objPerms.size());
REMARQUE : Si Règle de prix n’est pas défini comme Objet principal pour SBQQ__LookupQuery__c, vous pouvez supprimer 'SBQQ__LookupQuery__c' de la liste des objets dans l’étape 2 du code ci-dessus.
000394589

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.