开发者

Primary address in Address

开发者 https://www.devze.com 2023-04-07 18:00 出处:网络
Does anybody know how to make a address primary in 开发者_如何学CVendTable? I need to make a new field (checkbox) in the Address tab of VendTable (the datasource for Address in VendTable comes from D

Does anybody know how to make a address primary in 开发者_如何学CVendTable?

I need to make a new field (checkbox) in the Address tab of VendTable (the datasource for Address in VendTable comes from DirpartyAddressRelationship and Address).

Can anyone let me know step by step how to make a address primary?

There seems to be a lot of relations. I am not sure how this is working.


I assume you are asking how to set the primary address using code (not through the user interface).

Use the DirParty class:

static void DirPartyTest(Args _args)
{
    VendTable v = VendTable::find("10000");
    DirParty d = DirParty::constructFromCommon(v);
    ;
    d.getDirPartyAddress().parmIsPrimary(NoYes::Yes);
    Dirparty::updateAddressFromParty(d);
}

Using a specific address:

void setPrimary(Address a)
{
    DirParty d = DirParty::constructFromCommon(a);
    ;
    d.getDirPartyAddress().parmIsPrimary(NoYes::Yes);
    Dirparty::updateAddressFromParty(d);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号