@Bene_Immanuel, It seems PavithraSelvaraj is encountering an issue with the ‘getContact’ API for freshsales. The API works well in their local environment but throws an error after publishing.
The error suggests an issue with accessing a property of an undefined object. This might occur if there is a missing or improperly defined variable or parameter in the deployed environment compared to the local environment.
Possible solutions to explore:
Double-check if all the required variables (iparams) such as domain and apiKey are provided and configured correctly in the deployed environment.
Verify whether the context.contactId is properly passed and available in the deployed environment.
Ensure that there are no discrepancies between the local and deployed codes. For example, ensure they are in sync and all changes are pushed to the deployed environment.
If the error still persists after trying these solutions, it might require further investigation regarding the specific code implementation and configuration.