Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

DirPartyPostalAddressFormHandler - calling logistics postal address form for edit of party address from custom entity

$
0
0

Hi,

I have developed a custom entity which stores a party recId relating to DirPartyTable record.  The party has a postal address created against it.

I have tried passing the party record through to the DirPartyPostalAddressFormHandler class - however I am concerned that because I am calling from a custom entity it won't display the address for edit.

I changed it to pass through the primary location record from the party record to see if this would call up the address for edit, it calls the form but no address is returned.

The button I use for this - the code is as follows:

void clicked()
{
    Args                args = new args();
    DirPartyTable       partyRec = DirPartyTable::findRec(newEntity.Party);
    LogisticsLocation   loc;
    ;

    loc = LogisticsLocation::find(partyRec.PrimaryAddressLocation);

    args.record(loc);
    args.caller(this);

    new MenuFunction(menuitemDisplayStr(CustDirPartyPostalAddressEdit), MenuItemType::Display).run(args);

}

Can someone point me in the right direction as to what I need to modify possible in the DirPartyPostalAddressFormHandler class to achieve this.

Thanks


Viewing all articles
Browse latest Browse all 73760

Trending Articles