Invoice template: Refering to InvoiceItem.Custom fields
The client have defined the custom fields with the same name in
Subscription Rate Plan Charge Fields ---- Bundleinstanceid__c, Bundlename__c, Bundledescription__c
Invoice Detail Fields --- Bundleinstanceid__c, Bundlename__c, Bundledescription__c
When I refer to the field InvoiceItem.Bundleinstanceid__c in the groupby condition, it is refering to the value from Subscription Rate Plan Charge Fields. I was expecting the value to be picked up from InvoiceDetail fields.
Is there any way to force the system to refer to the invoice detail custom field instead of subscripton rate plan charge custom field?
Next I added a custom field only at the Invoice Detail field and tried to display it in the template and it worked fine. So here it was picking the value up from the invoice detail field. This field was not defined at the subscription rate plan charge level.
However the moment I applied groupby condition to the template, it again stopped working.
So is this something related to groupby condition?