Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

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

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
    GirishS 27,832 Super User 2024 Season 1 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
    Pavel Ioana 102 on at
    RE: How are values ​​initialized when a form is opened?

    It's done, thanks!

  • Verified answer
    GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 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
    Pavel Ioana 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
    GirishS 27,832 Super User 2024 Season 1 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
    Pavel Ioana 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
    GirishS 27,832 Super User 2024 Season 1 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

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

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans