Skip to main content

Notifications

Announcements

No record found.

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 222
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.
 
  • André Arnaud de Calavon Profile Picture
    295,992 Super User 2025 Season 1 on at
    Auto save Lines data instead of doing manually Form save button on my custom form.
    Hi JJDunaid,
     
    Apologies. The form name is EcoResProductDetailsExtended. The main data source is the table InventTable. 
  • JJDunaid Profile Picture
    222 on at
    Auto save Lines data instead of doing manually Form save button on my custom form.
     GirishS,, Sir can you suggest me anything ?
     
  • JJDunaid Profile Picture
    222 on at
    Auto save Lines data instead of doing manually Form save button on my custom form.
    Hi GirishS,
    Yes , I have passed rec id of "line" table to "line details" table on init value() of "Line Details" table.
  • GirishS Profile Picture
    27,825 Moderator on at
    Auto save Lines data instead of doing manually Form save button on my custom form.
    Hi Junaid,
     
    While inserting, are you assigning the Line table RecId to LineDetails table?
     
    Thanks,
    Girish S.
  • JJDunaid Profile Picture
    222 on at
    Auto save Lines data instead of doing manually Form save button on my custom form.
     
    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 .
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    295,992 Super User 2025 Season 1 on at
    Auto save Lines data instead of doing manually Form save button on my custom form.
    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. 

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 565

#2
Martin Dráb Profile Picture

Martin Dráb 536 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 402 Super User 2025 Season 1

Product updates

Dynamics 365 release plans