connect 2022 banner tablet connect 2022 banner mobile

亿博电竞赛事信息

By Nicole Gentz | April 15, 2015

 

Main Account Do you need a lookup that allows you to select multiple items in Microsoft 亿博电竞 AX? Do you need to store the multiple values in the database? Check out the following example using multi select lookup that allows you to select multiple main accounts in AX.

 

 

 

Use the following steps to create Multi Select Lookup in 亿博电竞 AX:

1.  Create an AOT query for the lookup.

 

SSIMainAccount

2. Create the control on the form, set the auto declaration property to yes

GroupSSI

3. In the Modified method of the control:

public boolean modified()
{
boolean ret;

ret = super ();

ttsBegin ;
SalesParameters.SSI_MainAccountId = SSI_MultisitePostingSales_Invoice_SSI_MainAccountId.text();
SalesParameters.update();
ttsCommit ;

return ret;
}

4. In the Class Declaration of the form:

SysLookupMultiSelectCtrl    msCtrl;

5. In the Init method of the form:

msCtrl = SysLookupMultiSelectCtrl::construct(element, SSI_MultisitePostingSales_Invoice_SSI_MainAccountId,

queryStr (SSI_MainAccount));

6. On the form datasource Execute query method:

public void executeQuery()
{
super ();

this.SSI_updateMainAccountCtrl();
}

7. On the form datasource create a new method to update the ctrl on load of the form:

public void SSI_updateMainAccountCtrl()
{
container        mainAccounts;

//Set the control value
SSI_MultisitePostingSales_Invoice_SSI_MainAccountId.text(SalesParameters.SSI_MainAccountId);

//Mark the appropriate checkbox in the drop down
mainAccounts = conNull();
mainAccounts = this.SSI_createContainers();

if (mainAccounts != conNull ())
{
// Set controls for existing records
msCtrl.set(mainAccounts);
}
  else
{
msCtrl.set( conNull ());
}
}

8. On the form datasource create a new method to hold the values that should be checked on the load of the form:

public container SSI_createContainers()
{
List            list = new List(Types::String);
ListIterator    i;
    container        RecIds, Names;
RecId           id;

//Create Container for the RecIds, Names
list = Global::strSplit(SalesParameters.SSI_MainAccountId,”;”);

i = new ListIterator(list);
while (i.more())
{
id = MainAccount::findByMainAccountId(i.value()).RecId;
RecIds += id;
Names += i.value();
i.next();
}

return ;

}

 

 

Related Posts

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

亿博电竞
csgo完美世界 加拿大28pc预测神测网 飞鱼电竞下注积分 加拿大28冷号APP计划 lol联赛 大圣电竞开盘