Posts

Showing posts from October, 2018

Selecting items from different form and display in salesline form

To add new button in salestable form-> Linesview -> to show all related items based on salestable itemtype. And selecting items in other form and need to display in salesline: 1. Create new form(INC_InventItemsdetails) by taking InventTable datasource and adding Display           menuitem (Inventitemdetailsdisplay). 2. Add menuitembutton in salesline, provide display menuitem(Inventitemdetailsdisplay). 3. In Form = INC_InventTabledetails -> Form ->Init()     public void init()  {     SalesTable      salesTable;     super();     salesTable  =   element.args().record();                 I               InventTable_ds.query().dataSourceTable(Tablenum(InventTable)).addRange(fieldNum(InventTable,I    NC_ItemType)).value(SysQuery::value(salesTable.INC_ItemType)); } 4. Taking co...

How to retrieve multiple selected records from Grid using X++

Image
How to retrieve multiple selected records from Grid using X++: In this post, we discuss how we can retrieve all selected(marked) records of a datasource or retrieve marked records form Grid. For this purpose follow the steps listed below. Create a new table named " Student " that contains two string fields i.e. Name & ID. Create a new form and add the newly created "Student" table in the datasource node. Next create a new button on the form, set its multiselect property to " Yes " . Now override the clicked method of the button and add the following code. Code snippet     int             recordsCount;     Student     studentLocal;     super();          recordsCount = student_ds.recordsMarked().lastIndex();  // Total number of marked records.     studentLocal = student_ds.getFirst(1);          while (studentLocal)     {   ...

How to show selected record(customer account) in query option

How to show selected record(customer account) in query option: In controller class -> Prepromptmodifycontract( ) protected void prePromptModifyContract() {         this.setRanges(this.parmReportContract().parmQueryContracts().     lookup(this.getFirstQueryContractKey()));   }