You need to sign in to do that
Don't have an account?
Kumar Rao 1
Code not working for Update Lead
Dear Folks,
Can some one please get me the logic.
Requirement: The below Integration code is working fine for Insert but unable to get it work for Update.. Your help is highly appreciated and thanks in advance.
Integration Code:
ServicesPostcodeanywhereCoUk.ArrayForWayPoints wpoint = new ServicesPostcodeanywhereCoUk.ArrayForWayPoints();
ServicesPostcodeanywhereCoUk.PostcodeAnywhere_Soap pcode = new ServicesPostcodeanywhereCoUk.PostcodeAnywhere_Soap();
ServicesPostcodeanywhereCoUk.DistancesAndDirections_Interactive_Distance_v1_00_ArrayOfResults result = pcode.DistancesAndDirections_Interactive_Distance_v1_00('XXXX-FKXX-RX91-NT72',weblead.Pick_Up_Post_Code__c,weblead.Destination_Postal_Code__c,wpoint,'Fastest');
Here is the code might need to be updated:
Integer pickupdropdis = result.DistancesAndDirections_Interactive_Distance_v1_00_Results[0].TotalDistance/1600;
Regards,
Kumar
Can some one please get me the logic.
Requirement: The below Integration code is working fine for Insert but unable to get it work for Update.. Your help is highly appreciated and thanks in advance.
Integration Code:
ServicesPostcodeanywhereCoUk.ArrayForWayPoints wpoint = new ServicesPostcodeanywhereCoUk.ArrayForWayPoints();
ServicesPostcodeanywhereCoUk.PostcodeAnywhere_Soap pcode = new ServicesPostcodeanywhereCoUk.PostcodeAnywhere_Soap();
ServicesPostcodeanywhereCoUk.DistancesAndDirections_Interactive_Distance_v1_00_ArrayOfResults result = pcode.DistancesAndDirections_Interactive_Distance_v1_00('XXXX-FKXX-RX91-NT72',weblead.Pick_Up_Post_Code__c,weblead.Destination_Postal_Code__c,wpoint,'Fastest');
Here is the code might need to be updated:
Integer pickupdropdis = result.DistancesAndDirections_Interactive_Distance_v1_00_Results[0].TotalDistance/1600;
Regards,
Kumar
Could you provide some more information, the code you have given is not sufficient to allow people to help you.
What have you tried? Where is the code being called from?
Paul
When user fills starting postcode and destination postcode in leads object, a field called distance to be automatically, hence we are integrating salesforce with 3rd party tool to get milage/distance.
Above sample code is used to parse postcodes and the last line gets results. The lines is working for create a new lead but can't work for update.
Can you please through a light please?
Thanks,
Kumar
You haven't provided enough information still. You say working for a new Lead, do you mean calling it from a trigger? Where is this code being used?