Search code examples
axaptadynamics-ax-2012

Argument is incompatible with required type


I am trying to pass some parameters from 1 class to another, a custom CustTable Event Handler to a custom Document Matrix class.

I want to pass through the customer e-mail, i am using:

DirParty::primaryElectronicAddress(custTable.Party, LogisticsElectronicAddressMethodType::Email)

and passing it through to a String EDT.

This gives me the error:

Argument is incompatible with required type

How can I change the parameter passthrough, so i can fill the returning value into a string EDT?


Solution

  • If you want to get Customer's email you can use:

    CustTable custTable;
    
    custTable.email();
    

    email() method returns the primary email of customer. If you need other email instead of primary you can check how it is done in email() method.

    Best Regards, Kristian