The scenario is:
- I have an autonumeric field
- I have a text field
- I have an external id text field
When a record is inserted/updated, I need to calculate
Opportunity_Code__c depending on: if
Original_AC_Code__c has value, Opportunity_Code__c equals to
Opportunity_Code__c equals to
I cannot use a formula field to calculate
Opportunity_Code__c because is necessary have the field as external id.
I cannot use a before trigger because, on insert, I don't have
I cannot use an after trigger because I need to update the same record being processed.
I cannot use a workflow because, on insert, Salesforce doesn't guarantee the
Perspective_Code__c field has value when executing.
Someone can help me how/when I can use an autonumeric field to complete another text field?