Skip to content

IFSAPP.COMM_METHOD_API.Get_Default_Email(Customer_No) doesn't return a customer's default email address — it only seems to work when passing a username instead of a customer number.

Answer

Use the more general Get_Default_Value function instead, specifying the party type explicitly: comm_method_api.Get_Default_Value(party_type_ => 'CUSTOMER', identity_ => customer_no_, method_id_ => 'E_MAIL'). Get_Default_Email assumes a different identity/party type than a Customer number, which is why passing a customer number directly to it doesn't work — Get_Default_Value handles any party type (Customer, Supplier, Person, etc.) as long as you specify the correct party_type_ and identity_ pairing.

← Browse Integrations and APIs questions