Apex heap size issu...
 
Notifications
Clear all

[Solved] Apex heap size issue

3 Posts
1 Users
0 Likes
500 Views
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

How to troubleshoot apex heap size issue?

Issue Tags
2 Replies
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

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++;
}
Reply
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

We had to use the Dynamic Bundles option to resolve this. 

Reply
Share: