Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Grid with fields from 2 datasources does't load the linked value after saving new record

Posted on by 30

Hello,

I have a form with 2 datasources.

- New_Table

-RouteTable

the new table has relation to RouteTable on RouteId with relation 0 to 1 to RouteTable.

On the form I have a grid with datasource = New Table.

The grid has fields from NewTAble and one field from RouteTable. RouteTable.Name.

When I open the form I can see the name for all existing records. The join on the datasource RouteTable is set to InnerJoin.

May problem is that when I add a new record the Name stays empty even when I move to the record below in the grid. 

I've tried overriding the write method and forcing a reread() and refresh() of both datasources but not successs.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Grid with fields from 2 datasources does't load the linked value after saving new record

    These properties should be set to No so that the user is unable to create a record in RouteTable. You can then change the Link type on data source RouteTable to Active and check if the Name field is displayed correctly.

  • Carlo T Profile Picture
    Carlo T 30 on at
    RE: Grid with fields from 2 datasources does't load the linked value after saving new record

    Yes.

    My problem is not the creation. My problem is that when I create a new record  or modify a record in NewTable the field 'Name' that I pull from the joined RouteTable doesn't refresh until I reopen the form.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Grid with fields from 2 datasources does't load the linked value after saving new record

    Hi Carlo,

    Have you set the AllowCreate, AllowDelete and AllowEdit properties to No in RouteTable data source?

  • Carlo T Profile Picture
    Carlo T 30 on at
    RE: Grid with fields from 2 datasources does't load the linked value after saving new record

    No. New records are only in New Table. the join to RouteTable is to display the Name of the Route associated with RouteId.

    I can solve the problem with a Display method on my NewTable but with Display method I can't sort or search on the grid.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Grid with fields from 2 datasources does't load the linked value after saving new record

    Sorry Carlo. I missed that part.

    On creating a new record in New_Table, are you creating a new Route as well? Or are you choosing an existing RouteId?

  • Carlo T Profile Picture
    Carlo T 30 on at
    RE: Grid with fields from 2 datasources does't load the linked value after saving new record

    Thank you Gunjan,

    I specified in my original message that the NewTable relates to RouteTable with the field RouteId

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: Grid with fields from 2 datasources does't load the linked value after saving new record

    Hi Carlo,

    Based on which fields have you set the relation between New_Table and RouteTable?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans