web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Auto save Lines data instead of doing manually Form save button on my custom form.

(1) ShareShare
ReportReport
Posted on by 226
I have two Data sources on form as / Line /and / Line Details/. The relation between them is on RECID of Table /Line/. The line table is used to store item information etc on my form. 
I have an enum field in /line table/ with three elements for suppose, when I select 1st element three rows are added into /Line details / table and number of lines for other two elements. Code validation is performed on modified field() on my enum field. when I insert data into line and select one element from Enum I  have to  save the record from save button on form or /Ctrl s/.
After saving I have to change the enum  element again as  I have changed the enum element the  lines associated with element  are added into the /Line Detail / table.
I have tried linedetails_ds.refresh() , linedetails_ds.research(true) in my modifiedfield() method.
In simple the recId from lines table is not passing into line details table until I save the form or refresh it / is there any way through which I can do it without saving or refreshing the form.
 
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    307,271 Super User 2026 Season 2 on at
    Hi JJDunaid,
     
    There is a solution for your current issue. Examples are available in the application. On the form InventTable, there are multiple data sources with a similar scenario. The ItemId field is then passed to the related data sources using the write() method. You don't need refresh or research commands. 
  • JJDunaid Profile Picture
    226 on at
     
    I could not find any form named "Invent Table " in AOT. Can you plz elaborate more which form you are pointing on. so I can get help or refrence from there .
  • GirishS Profile Picture
    27,843 Moderator on at
    Hi Junaid,
     
    While inserting, are you assigning the Line table RecId to LineDetails table?
     
    Thanks,
    Girish S.
  • JJDunaid Profile Picture
    226 on at
    Hi GirishS,
    Yes , I have passed rec id of "line" table to "line details" table on init value() of "Line Details" table.
  • JJDunaid Profile Picture
    226 on at
     GirishS,, Sir can you suggest me anything ?
     
  • André Arnaud de Calavon Profile Picture
    307,271 Super User 2026 Season 2 on at
    Hi JJDunaid,
     
    Apologies. The form name is EcoResProductDetailsExtended. The main data source is the table InventTable. 

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 515 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 417 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 360

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans