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

How to make form open on specific record?

(0) ShareShare
ReportReport
Posted on by 90

I have two forms FormA and FormB, when open FormB from FormA the cursor always points to the first record. I want to make the cursor of FormB points to the record related with FormA.

I tried tableB_ds.positionToRecord(record) but it is not working. I also tried tableB_ds.findRecord(_record) and none of them worked with me.

I have the same question (0)
  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi CSafwat,

    Please check this thread. It answers a question similar to the one you have.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi CSafwat,

    Usually, you can achieve this behavior by implementing a relation between the caller table on FormA and the root table on FormB. Do you have this kind of relations between tables?

  • CSafwat Profile Picture
    90 on at

    Hi Gunjan,

    I can't use this solution as it's not the main datasource of the Form.

  • CSafwat Profile Picture
    90 on at

    Hi Sergei,

    actually they have relation but the problem is tableA in FormA have relation with tableB in FormB but tableB is not the main datasource of FormB. so, I am trying to make the cursor of tableB points to the correct position.  whenI used tableB_ds.findRecord(_record) the cursor gets the right record but when the form opened the cursor returned to the first record.

  • Ranjeet_Kr Profile Picture
    on at

    Hi,

    Could you please help us with the complete scenario to test this behavior in standard environment.

  • Suggested answer
    Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    If it's the main data source, you'll get a dynamic link automatically, but you can explictiyl use addDynalink to add it to a different data source (and let the standard logic do the rest).

    I used this technique in DataReferenceSearcher, therefore you can look at a concrete example there.

  • CSafwat Profile Picture
    90 on at

    Thank you all.

    I solved the problem by using tableB_ds.positionToRecord(record) but calling it in linkActive() method of the form datasource.

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 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 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