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, ...
Answered

Form with multi-datasources inserting new record into one table only

(0) ShareShare
ReportReport
Posted on by 65

Hi

I have some parameterization table (table X) which have personnel number and its custom properties. This table is a data source for a simple form with two command buttons (NewButton, DeleteButton).
Now, I have to add to that form a column with department (from OMOperatingUnit.Name). I have added few new data sources to get information about department (HcmWorker -> HcmPositionWorkerAssignment -> HcmPosition -> HcmPositionDetail -> OMOperatingUnit; LinkType - OuterJoin).
The problem is: when I'm trying to add a new record to my parm table (table X) I have validation error with info, that some field in OMOperatingUnit is empty. When I change LinkType to Delayed or Passive I can add new record without problem but in form grid data in department column isn't visible (sometimes active or first record only)
How to set it up?

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    You'll need some code to achieve that; fortunately it's very simple. You'll need to override two methods of the joined data source(s).

    Remove super() from write() to prevent saving of the record. And skip super() in validateWrite() as well (and return true) to skip all the irrelevant validations.

  • everand Profile Picture
    65 on at

    Thank you - it works fine (previously I have tryied override write() and initValue() method instead validateWrite())

    Another, but coresponding problem is:

    The table X (next one - I have few such parm forms) has ValidTimeStateFieldType set as Date. The form's datasource (table x) has ValidTimeStateAutoQuery set to DateRange. Unfortunatelly connecting table x datasource to HcmPositionWorkerAssigment (through HcmWorker) I'm getting error with incomatible data type in ValidTimeStateFieldType between those two tables. The form woks only if ValidTimeStateAutoQuery on table X datasource is set to AsOfDate, what is undesirable.

    Is the any way to achieve it without changing ValidTimeStateAutoQuery to AsOfDate?

  • Martin Dráb Profile Picture
    237,926 Most Valuable Professional on at

    If the topic of this thread (Form with multi-datasources inserting new record into one table only) is resolved, please verify the answer. And either create a new thread for the other topic, or I (as a moderator) can split this thread for you.

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
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans