Skip to main content
Roman Altshuler (NA) ha preguntado en #Apex
Trying to deploy this trigger to production. Received following error message:

 Methods defined as TestMethod do not support Web service callouts 

Stack Trace: null

 

trigger updateOppField on Account(before insert, before update){

for(Account acc : trigger.new){

if(acc.Text_ID__c != null){

acc.A_Opportunity__c = acc.Text_ID__c;

}

}

}

Any ideas/solutions will be greatly appreciated.

 
3 respuestas
  1. 28 oct 2015, 17:04
    Hi,

    It seems like you are including a test class in your change set and in that test class you are trying to make a web service callout that is not supported by Salesforce.

    This trigger does not have any error.

    The issue here is with your test class which you need to fix.

    You can get the help from below link to make your test class run correctly :

    https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex_testing.htm

    Let me know if you need more help or information on this.

    Thanks,

    Abhishek
0/9000