1

I have a trigger set up that is intended to create QuoteLineGroup records for a Quote when the Quote is first created, based on the Assets that exist for the Account. The trigger works as expected and the QuoteLineGroups are being created after insert.

However, when I enter the "Edit Lines" functionality, the Quote Line Groups are not visible, nor can I create additional Groups within the editor. There's obviously something being set on the back end that allows for the editor to create new Groups but something goes awry when creating those records through some other means.

Does anyone know of any other dependencies that the editor relies upon when working with those QuoteLineGroup records?

Below is a sample of my code:

    for(SBQQ__Quote__c q : workingList){
        if(acctMap.get(q.SBQQ__Account__c) != null && acctMap.get(q.SBQQ__Account__c).Assets.size()>0){
                boolean marker = true;
                integer i = 1;
                for(Asset a : acctMap.get(q.SBQQ__Account__c).Assets){
                    SBQQ__QuoteLineGroup__c ql = new SBQQ__QuoteLineGroup__c();
                    ql.SBQQ__Account__c = q.SBQQ__Account__c;
                    ql.SBQQ__Quote__c = q.id;
                    ql.Hardware__c = a.id;
                    ql.Master_Group__c = marker;
                    ql.Name = a.Name;
                    ql.SBQQ__Number__c = i;
                    ql.CurrencyIsoCode = q.CurrencyIsoCode;
                    ql.SBQQ__CustomerTotal__c = 0;
                    ql.SBQQ__NetTotal__c = 0;
                    ql.SBQQ__ListTotal__c = 0;
                    groups.add(ql);
                    marker = false;
                    i++;
                }
            }
        }

        if(groups.size()>0){
            insert groups;
        }
2

You have to set the Quote field SBQQ__LineItemsGrouped__c to true to use quote line groups or solution groups.

1
  • Ahhhh, very helpful. Thanks! Feb 19 '20 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.