09.06.2011, 03:27 | #1 |
Участник
|
dax-lessons: On dialogs – SysLookupMultiSelectCtrl in Dynamics AX 6.0
Источник: http://dynamicsaxgyan.wordpress.com/...namics-ax-6-0/
============== This post is in continuation of my old post which helped to use SysLookUpMultiSelectCtrl class on Forms. The below class will help you to implement the same in the dialogs [Used Runbase framework]. Please note I have used the same query [CustTableLookUp] which I used in my last post. Please follow the class and its methods as shown below. X++: public class SR_LookupMultiSelectDialog extends RunBase { DialogRunbase dialog; DialogGroup dialogGrp; FormBuildStringControl fbsCtrlMultiSelect1; FormStringControl fsCtrlMultiSelect1; container returnIds1; SysLookupMultiSelectCtrl msCtrl1; } __________________________________________________ public ClassDescription caption() { return Multiple select lookup on ; } __________________________________________________ // Generate dialog public Object dialog() { FormBuildControl setupGroupControl; dialog = super(); dialog.alwaysOnTop(true); dialog.windowType(FormWindowType::Standard); dialogGrp = dialog.addGroup(Group); setupGroupControl = dialog.formBuildDesign().control(dialogGrp.formBuildGroup().id()); // Control with the MULTI-SELECT fbsCtrlMultiSelect1 = setupGroupControl.addControl(FormControlType::String, identifierstr(ctrlRoles1)); fbsCtrlMultiSelect1.label(Select multiple ); dialog.allowUpdateOnSelectCtrl(true); this.dialogSelectCtrl(); return dialog; } __________________________________________________ public void dialogPostRun(DialogRunbase _dialog) { FormRun formRun; super(dialog); formRun = _dialog.dialogForm().formRun(); if (formRun) { fsCtrlMultiSelect1 = formRun.design().control(fbsCtrlMultiSelect1.id()); msCtrl1 = SysLookupMultiSelectCtrl::construct(formRun, fsCtrlMultiSelect1, querystr(CustTableLookUp)); } } __________________________________________________ // Get input values public boolean getFromDialog() { #Characters // Return Ids from the 1st mutli-select control if (msCtrl1) returnIds1 = msCtrl1.get(); info(Control 1 + con2StrUnlimited(returnIds1,#SEMICOLON)); return true; } __________________________________________________ static void main(Args _args) { SR_LookupMultiSelectDialog SR_LookupMultiSelectDialog = new SR_LookupMultiSelectDialog(); if (SR_LookupMultiSelectDialog.prompt()) { SR_LookupMultiSelectDialog.run(); } } __________________________________________________ Please refer to Tutorial_LookUpMultiSelectDialog for more detailed example. Happy Dax 6ng Sreenath Источник: http://dynamicsaxgyan.wordpress.com/...namics-ax-6-0/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. Последний раз редактировалось Poleax; 09.06.2011 в 10:41. Причина: оформление |
|
|
|