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

Making a Custom Column Linkable with Cross-Company Support in PurchReqTableListPage

(4) ShareShare
ReportReport
Posted on by 441
Hello,
I have a custom field (CarId) in the PurchReq table. I created a relationship between the PurchReq table and a custom CarDetail table, with the Relationship Type set to Link.
when I click on a CarId in the PurchReqTableListPage form it redirects me correctly to the custom CarDetail form.
However I now have a new requirement the CarId records are created in different companies (different DataAreaId) I want to change the company context to the correct one before opening the CarDetail form so that it supports cross-company navigation.
How can I make the link handle cross-company redirection properly?
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,449 Super User 2025 Season 2 on at
     
    I think the best way to meet your requirement is to change the “Save Data Per Company” property to no in your custom table.  
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,200 Super User 2025 Season 2 on at
    Hi D365FO Junior Dev,
     
    The PurchReqLine has examples how to achieve your requirement. It has e.g. for the ItemId field also a ItemIdDataArea field. In the table relation, the DataArea of your custom table can then be added to the table relation. This will result in having a lookup and relation per legal entity.
  • D365FO Junior-Dev Profile Picture
    441 on at
    Hello everyone,
     
    Thank you for replies,
    After I reviewed your suggestions I can't go for Save Data Per Company the CarDetail table contain a lot of data and used in other Models however the PurchReqTable not has  DataAraId field so I can't create  that relationship I would prefer to use jumpRef and changeCompany methods, but I’m not sure where exactly the jumpRef should be used for example should it be placed on the PurchReqTableListPage form's data source or in one of its events?
  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at
    You're trying to create the relation in a wrong way.
     
    You are interested in DataAreaId of the CarDetail, not of PurchReqTable. PurchReqTable is even shared across companies, therefore trying to use its DataAreaId wouldn't make sense.

    You currently have CarId in PurchReqTable, but it's not sufficient to uniquelly identify a record in CarDetail table. You need a combination of CarId and DataAreaId, therefore you need to add an extra field to PurchReqTable that will hold the DataAreaId of the related CarDetail record. Then you can set up a table relation.

    Methods like changeCompany() won't help you if your data models lacks the information about which company you need to switch to.

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
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 423 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans