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
Chetna AgrawalChetna Agrawal 

deploy inbound change set in production

i have uploaded outbound change set to production but while deploying it showing 2 errors.User-added image
Trigger is:
Trigger FieldUpdateEmail on Opportunity (Before insert,Before update)
{  
    set<id> conid=new set<id>();
    List<Contact> con=[Select id,Name from Contact];

    for(Contact c:con)
    {
        conid.add(c.id);  
    }
    List<Id> idd=new List<Id>();
     
    for(Opportunity oo:Trigger.New){
     conId.add(oo.Contact__c);
    }
    Map<ID, Contact> m = new Map<ID, Contact>([SELECT Id,Solicitor__r.Email_Id__c,Solicitor__c,Solicitor__r.First_Name__c,Solicitor__r.Last_Name__c FROM Contact where id In:conId]);
  for(Opportunity oo:Trigger.New){
   oo.TestEmail__c=m.get(oo.Contact__c).Solicitor__r.Email_Id__c;
   oo.Solicitor_FullName__c=m.get(oo.Contact__c).Solicitor__r.First_Name__c + ' '+ m.get(oo.Contact__c).Solicitor__r.Last_Name__c;
 //   oo.Solicitor__c=m.get(oo.Contact__c).Solicitor__c;
    }
  
}

Solicitor__c is a lookup field on contact. also solicitor is custom object whose API name is Solicitor__c.
Chetna AgrawalChetna Agrawal
Errors:
1.Contact.Solicitor__c -------  Cannot update a field from a Formula to something else
2.FieldUpdateEmail (Apex Trigger)  Didn't understand relationship 'Solicitor__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Deepu161Deepu161
Cannot update a field from a Formula to something else : Please let me know the solution for this ..