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

How are values ??initialized when a form is opened?

(0) ShareShare
ReportReport
Posted on by 102

I have added a field in the VendTable table that will also be in the PurchTable form, what should I do to automatically display the information in the form and make the field non-editable. It's like the address field. I tried to use the initFromVendTable method, but to no avail.

pastedimage1671444315713v1.png

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: How are values ​​initialized when a form is opened?

    If it's solved your please mark it as verified. So, others can make use of it.  It's done by clicking Did this answer your question? > Yes on the particular reply.

    Thanks,

    Girish S.

  • Pavel Ioana Profile Picture
    102 on at
    RE: How are values ​​initialized when a form is opened?

    It's done, thanks!

  • Verified answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: How are values ​​initialized when a form is opened?

    In the PurchTable there is a method named initFromVendTableIL. On the same method they have got the vendTable buffer. You can use that buffer to assign ExternalAccount values from VendTable to PurchTable.

    Thanks,

    Girish S.

  • Pavel Ioana Profile Picture
    102 on at
    RE: How are values ​​initialized when a form is opened?

    The user will enter the value in the External Account field in Vendors, and the same information that the user enters for the Vendor must also be displayed in the External Account field on Purchase Orders.

    I tried to put this code on the initFromVendTable method on the PurchTable table, but I don't know if it is correct. 

    _vendTable.PI_ExternalAccount=this.PI_ExternalAccount;

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: How are values ​​initialized when a form is opened?

    From which table you will get ExternalAccount value?

    Can you show us your code?

    Thanks,

    Girish S/

  • Pavel Ioana Profile Picture
    102 on at
    RE: How are values ​​initialized when a form is opened?

    The field added to the VendTable is ExternalAccount and is of string type

    pastedimage1671447421987v1.png

    The information from the External Account field on the VendTable must be transferred to the External Account field on the PurchTable.

    pastedimage1671447429503v2.png

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: How are values ​​initialized when a form is opened?

    Hi Pavel Ioana,

    What value should be shown on the custom field you created?

    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 225

#2
Martin Dráb Profile Picture

Martin Dráb 174 Most Valuable Professional

#3
Adis Profile Picture

Adis 132 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans