Notifications
Clear all
Jan 04, 2023 5:06 am
How to troubleshoot apex heap size issue?
2 Replies
Jan 04, 2023 5:10 am
Apex heap size issue could be caused by apex code, visual force page and also in CPQ configurations page (which is a VF page). In my case issue was with products, options and features - loading too many of them, even after Enabling Large Configurations in CPQ.
You can use this code and execute it from the anonymous window to troubleshoot more: Id parentId = 'ID OF BUNDLE '; List<Id> idList = new List<Id>(); idList.add(parentId); integer Level = 0; While(idList.size() > 0){ system.debug('Level - ' + Level + ' | Options at level - ' + idList.size()); List<SBQQ__ProductOption__c> prodOptions = [SELECT Id, SBQQ__OptionalSKU__c FROM SBQQ__ProductOption__c WHERE SBQQ__ConfiguredSKU__c IN :idList]; idList = new List<Id>(); if(prodOptions.size() > 0){ for(Integer i=0; i<prodOptions.size(); i++){ idList.add(prodOptions[i].SBQQ__OptionalSKU__c); } } Level++; }
Jan 08, 2023 11:10 am
We had to use the Dynamic Bundles option to resolve this.