// 1. CPQ+AA-Objekte (LCO + Abhängige) nach Hierarchieordnung zum Löschen definieren 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' }; // Unten durch Berechtigungssatz-ID ersetzen String permSetId = ''; ObjectPermissions[] profileObjPerms; // 2. Iterieren und löschen, also nicht alles in 1 Batch erledigen for(String objName : customLCOAndDependentObjects) { // Abfrage der Objektberechtigungen nach Objekt profileObjPerms = [SELECT Id FROM ObjectPermissions where Parent.Id = :permSetId and SobjectType = :objName]; System.debug('Object perms for object:'+objName+':'+profileObjPerms.size()); try{ // Vor dem Ausführen die Zeile unten auskommentieren // profileObjPerms; löschen } catch(Exception e){ System.debug('Obj perms update failed due to the follow reason: '+ e + ',' + e.getStackTraceString()); } } // 3. Abfrage, um sicherzustellen, dass alle relevanten Objektgenehmigungen gelöscht sind ObjectPermissions[] objPerms = [SELECT Id FROM ObjectPermissions where Parent.Id = :permSetId and SobjectType = :customLCOAndDependentObjects]; System.debug('Rerun Object Perm Records for CPQ & AA: '+ objPerms.size());
HINWEIS: Wenn "Preisregel" nicht als Master-Objekt für "SBQQ__LookupQuery__c" definiert ist, können Sie 'SBQQ__LookupQuery__c' aus der Liste der Objekte in Schritt 2 des obigen Codes entfernen.
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.