web
You’re offline. This is a read only version of the page.
close
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 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.
 
I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,171 Super User 2025 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,827 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
    301,171 Super User 2025 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 467 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans