Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to show fields of InventTable inside line grid of PurchTable form?

(0) ShareShare
ReportReport
Posted on by 155
Hi experts,
I am trying to show few custom fields of InvenTable into line grid of PurchTable form but I unable to do that as InventTable is not used as a data source in that form. Can anyone please let me know how can I do that without using display methods. 
I will really grateful for your suggestions. 
Thank you,
 
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    How to show fields of InventTable inside line grid of PurchTable form?
    It sounds like your code in validateWrite() and write() isn't correct, but I can't comment on your code unless you show it to us.
  • Arif Hussain Profile Picture
    Arif Hussain 155 on at
    How to show fields of InventTable inside line grid of PurchTable form?
     
    I have tried your suggestion but when I add a new line in purchLine and save the record, it shows the validation of two fields of InventTable which are Product and Item to be filled in. These fields are mandatory at table level and I have override the validateWrite and write at datasource level. 
     
    What to do with this validation? I cannot override at table level methods as it will get affected everywhere then. 
     
    Please let me know. 
     
    Thank you,
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 7,349 Super User 2024 Season 2 on at
    How to show fields of InventTable inside line grid of PurchTable form?
    Hi Arif,
     
    As Martin said, you need to create an extension of PurchTable form and add InventTable as a  datasource in the form and join them together.
    Then you'll be able to drag and drop fields from InventTable and make them appear in the form grid 
     
    Thanks
    Layan Jweihan
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    How to show fields of InventTable inside line grid of PurchTable form?
    If you don't want to use display method, you must add a datasource by yourself - in an extension. It needs to be joined to PurchLine, and you'll need to override validateWrite() and write() to prevent saving of InventTable when saving PurchLine.

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans