You need to sign in to do that
Don't have an account?
rornelas
Populate lookup value into text field
Hi Everyone,
I have a a lookup field that gets populated with the territory name by a Managed package. I want to take the value of this lookup and populate an existing text field. This is what I have so far. Any help would be greatly appreciated!
I have a a lookup field that gets populated with the territory name by a Managed package. I want to take the value of this lookup and populate an existing text field. This is what I have so far. Any help would be greatly appreciated!
trigger UpdateExistTerritory on Service_Order__c (before insert, before update) { List<Service_order__c> ServiceTerr = new List<Service_order__c>(); for(Service_order__c servOrder : trigger.new){ if(servOrder.ManagePckgTerritory__r.Name != null){ servOrder.ManagePckgTerritory__r = servOrder.ExistingText_field__C; ServiceTerr.add(servOrder); } } update ServiceTerr; }
I will try the trigger.