Hi All..
I make a form and use CustInvoiceTrans table as the datasource of my grid.
When I open :
I'm in order to insert data from selection data on that form's grid into my new table (sjb_kompensasi_harga_table) when I click "Post".
The relation between both tables is invoiceId.
How to insert the data from the grid on form into sjb_kompensasi_harga_table?
Thank you..
*This post is locked for comments
How to display current/selected grid data onclick the View Data button
Yes it is still applicable. I would say have a look on SalesQuotationUpdate class this is used for multiple scenarios. You can check the implementation from Sales and Marketing | All Quotations | Follow up | Cancel
Thanks Sukrut and Martin.
By the way, you can simplify the code with MultiSelectionHelper class.
Hi Faisal Fareed.
I am working on Dynamics A7/D365 and I need the same logic. Is this logic applicable to AX7/D365?
Mr. Fareed,
Great, It worked.
Thank you a lot for the solution.
Best Regards,
Rizki
Go to button properties and change the multiSelect property to YES.
Hi Mr. Fareed.
I tried your example to my clicked void. And It worked.
But the button is disabled when i choose multiple rows selection.
How can i insert multiple rows selection?
Thank You.
Best Regards,
Rizki
Hi Rizki,
There are many possible ways to retrieve records from grid and use it for any purpose. For your requirement could you please describe it in more details.
A sample form screenshot for you to guide you how can get current record value or selected record value from grid.
On button click you can check either you are retrieving correct values or not.
void clicked()
{
CustInvoiceTrans localCustInvoiceTarns;
super();
//info(CustInvoiceTrans.InvoiceId); // this is print the selected record Invoice Id in info.
//get the first selected record of the datasource and loop through all of the selected records
// this loop will go through all selected records from your grid and you can then use these values
for(localCustInvoiceTarns = CustInvoiceTrans_DS.getFirst(true) ? CustInvoiceTrans_DS.getFirst(true) : CustInvoiceTrans_DS.cursor(); localCustInvoiceTarns; localCustInvoiceTarns = CustInvoiceTrans_DS.getNext())
{
info(localCustInvoiceTarns.InvoiceId);
}
}
You can also share your email with me I have created a small prototype for you but sorry I cannot attach .xpo file here.
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator