0

I have a class where we define some behavior under an IsClone() condition. Specifically a few fields are nulled/blanked. I was asked to change it so that a specific field persists across clones (lets call it status), so I updated the code to be q.Status = q.SBQQ__Source__r.Status;

This didn't work, it continued to null the fields. However when I removed that line entirely it copied the field, which makes sense. However I'm wondering why exactly the specified source copying didn't do anything. If I defined it vs. letting the typical cloning process do it's thing, why wasn't the behavior the same?

For reference, the method in which we set up the cloned fields is called on a BeforeInsert trigger.

1 Answer 1

0

I was able to determine that the answer was that since SBQQ__Source__c is a field from the managed package I could not specify an order of operations to ensure that the field had been populated before my trigger ran. So in my trigger context the source field was null when my trigger ran and was only populated afterwards, resulting in an always null scenario.

You must log in to answer this question.

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