web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How do I initialize a field on the PurchParmLine table?

(0) ShareShare
ReportReport
Posted on by 106

I have a field called ItemType that I added to the PurchParmLine table, the field must also be added in the PurchEditLines form and must automatically take the value from the PurhLine table. I tried to put the code on the initFromPurchLine method on the PurchParmLine table and on the initFromPurchLine method on the VendDocumetLineMap, but it is not displayed.  I created a relationship with PurchLine on the PurchParmLine table, but without result. The field is not even populated on the table PurchParmLine.

 pastedimage1671721193349v1.pngpastedimage1671721230972v2.pngpastedimage1671722080697v1.pngpastedimage1671721834095v4.png

I have the same question (0)
  • GirishS Profile Picture
    27,829 Moderator on at

    Hi Pavel Ioana,

    Have you debugged the code and find out whether debugger is hitting in initFromPurchLine method.

    Thanks,

    Girish S.

  • Pavel Ioana Profile Picture
    106 on at

    I used the debugger and it doesn't fit into any of the methods and I really don't know where I should place the code

  • GirishS Profile Picture
    27,829 Moderator on at

    There is class named "PurchFormLetterParmData" - createParmLine(Method name) - Try to populate your custom fields in this method.

    Also add the debugger point in the method and check whether the debugger is hitting.

    Thanks,

    Girish S.

  • Pavel Ioana Profile Picture
    106 on at

    pastedimage1671879842496v1.pngpastedimage1671880127167v2.png

    I tried to populate the field, but apparently the field on the PurchParmLine does not receive the value and says that the field does not exist even though it is added

  • GirishS Profile Picture
    27,829 Moderator on at

    Field does not exist error indicates that new field is not synced to DB. Try doing AOT synchronization and check.

    Also on the method createParmLine you are getting PurchLine as a buffer as a method parameter, So you can directly use that buffer to assign values to your custom fields in PurchParmLine table.

    Thanks,

    Girish S.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 673 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 280 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 213 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans