Announcements
How to get data source from data method in the form?
Hi Vikash,
Can you please elaborate on your question? What is the business requirement you want to fulfill?
Hi vikash,
You can use like that.
This is an example of an EventHandler using modify OnModified event.
[FormDataFieldEventHandler(formDataFieldStr(InventTransferOrders, InventTransferLine, QtyTransfer), FormDataFieldEventType::Modified)]
public static void QtyTransfer_OnModified(FormDataObject sender, FormDataFieldEventArgs e)
{
FormRun formRun=sender.datasource().formRun();
FormDataSource inventTransferLine_ds = formRun.datasource(‘yourdatasourcename’);
InventTransferLine inventTransferLine = inventTransferLine_ds.cursor();
inventTransferLine .initvalue();
}
You can use this :
DataSource_ds replace datasource with the name of table
exemple to get current cursor :
DataSource dataSource = DataSource_ds.cursor();
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 407 Super User 2026 Season 1
Subra 394
Martin Dráb 275 Most Valuable Professional