Hi.
I created a new field "BillType" in RetailParameters which will have multiselect lookup in RetailParameters form.I am able to select multiple values from the lookup but on clicking Save button or on refreshing the page the selection dissappears.
I want to save the values selected in the RetailParameters datasource so that I can fetch it later in my report based on the selection .
Please help me find what I am missing.
FYI. Form String control: BillType_InfoCode (auto declaration set Yes, Datasource,datafield not set)
1.In form extension class: public SysLookupMultiSelectCtrl msCtrlCust; public void init() { FormRun formRun = this; //FormStringControl BillType_InfoCodeCtrl = formRun.design().controlName(formControlStr(RetailParameters, BillType_InfoCode)); Query query = new Query(); QueryBuildDataSource qbds; TableId multiSelectTableNum = tableNum(RetailParameters); container selectedFields = [multiSelectTableNum, fieldName2id(multiSelectTableNum, fieldStr(RetailParameters,Billtype))]; next init(); qbds = query.addDataSource(tableNum(RetailInfocodeTable)); qbds.fields().dynamic(true); qbds.fields().addField(fieldNum(RetailInfocodeTable,infocodeId)); qbds.fields().addField(fieldNum(RetailInfocodeTable,description)); //qbds.relations(true); //assigning control and query to the class msCtrlCust = SysLookupMultiSelectCtrl::constructWithQuery(formRun,BillType_InfoCode , query); } public void SetCustGroupLookpValues() { container ids; container recIds; int i; RetailParameters retailParameters; for(i=1;i<=conLen(str2con(retailParameters.BillType,';')); i ) { recIds = RetailParameters::find(conPeek(str2con(retailParameters.BillType,';'),i)).RecId; ids = conPeek(str2con(retailParameters.BillType,';'),i); } msCtrlCust.set([recIds,ids]); ids = conNull(); recIds = conNull(); } 2.In form control class public boolean modified() { boolean ret; RetailParameters retailParameters; ret = next modified(); ttsBegin; retailParameters.BillType = this.text(); retailParameters.write(); ttsCommit; return ret; } 3.In form datasource class public int active() { int ret; ret = next active(); element.SetCustGroupLookpValues(); return ret; }