function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MlearyMleary 

Need help with Apex Trigger

The Standard Object Invoicing is created from the Opportunity.  There are three custom lookup fields on invoicing - Account Name, Opportunity Owner, and Client Success Manager.  The Account Name and Opportunity Owner can be found on the Opportunity.  The Client Success Manager can be found on the Account as a custom field.

 

Could someone help me write code test code to auto-fill the 3 lookup fields on the Invoice?

sivaextsivaext

hi 

 

you can write formula field on opportunity for getting client success manager id

 

formula field looks like 

 

opportunity.account.client_success_Manager__c

MlearyMleary

We would like for them to be lookup fields as opposed to formula fields.

sivaextsivaext

Hi 

 

how your are creating invoice records? using trigger on opportunity?