0

I have field in Quote line that looks up to the Quote line Group [groupA__c]. When that field is populated in the parent Quote line of a bundle, that bundle should be reassigned to the group indicated on that field. We are doing this via QCP. The problem is we can see the reassignment happening as expected in our logs, but not on the actual record. Does anyone have an idea with this issue?

quoteLineModels.forEach(function (line) {
    if(line.parentItem == null) {
        if(line.record.groupA__c != null) {

            line.record.SBQQ__Group__c = line.record.groupA__c;
            console.log('updated parent group: ' + line.record.SBQQ__ProductCode__c + ' : ' + line.record.SBQQ__Group__c );
            
            getAllComponents(line).forEach(function(comp){
                comp.record.groupA__c = line.record.groupA__c;
                console.log('comp.record.groupA__c: ' + comp.record.groupA__c);

                comp.record.SBQQ__Group__c = line.record.groupA__c;
                console.log('comp.record.SBQQ__Group__r.Name: ' + comp.record.SBQQ__Group__c);
            });
        }
    }
}); 

function getAllComponents(line) { 
    var results = line.components;
    results.forEach(function(comp) { 
        results = results.concat(getAllComponents(comp)); 
    }); 
    return results; 
};

1 Answer 1

0

This doesn't seem possible in QCP. We sorted to apex logic instead to make this work

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .