Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Vendor page modify

(0) ShareShare
ReportReport
Posted on by 5

Hello All,

I have added a field in vendor table called Status. We want this status field to be updated when any field in vendor table change/modify,

Status is a option field: Authorized, unauthorized. 

Can anyone please help,

Thanks Much,

Zoe

  • Sypriya Guarav Profile Picture
    Sypriya Guarav 25 on at
    RE: Vendor page modify

    can u just share the snap of your error so will clear why not working

  • Zoe_200 Profile Picture
    Zoe_200 5 on at
    RE: Vendor page modify

    Already tried but not working

  • Pratik Mhaske Profile Picture
    Pratik Mhaske 10 on at
    RE: Vendor page modify

    Thankyou for your Response..Its very Helpfull

  • Sypriya Guarav Profile Picture
    Sypriya Guarav 25 on at
    RE: Vendor page modify

    right the code on page

    OnModifyRecord() : Boolean

    begin

    Vendor.status := vendor.status :: Authorized;

    End;

    which status u want to update on the field assign that status.

  • Zoe_200 Profile Picture
    Zoe_200 5 on at
    RE: Vendor page modify

    As the page contain two different tables so may be that could be the reason somwhow

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Vendor page modify

    This is a bit strange, it seems that the code is placed in the OnRename (Table) Trigger.
    Sorry for not being able to solve your problem, hope other experts can give you better advice.

    Thanks

    ZHU

  • Zoe_200 Profile Picture
    Zoe_200 5 on at
    RE: Vendor page modify

    Hello Zhu,

    Thanks for your reply.

    I already tried this. It only work when we select vendor no. If we change/modify any other field that status doesn't change.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Vendor page modify

    Hi, I don't know the structure of your new table, but I think this table should be related to the Vendor table. You can use the following methods to update Vendor table.

    pastedimage1680823686951v2.png

    Hope this helps.

    Thanks.

    ZHU

  • Zoe_200 Profile Picture
    Zoe_200 5 on at
    RE: Vendor page modify

    Hello Yun,

    Actually My vendor page contain data of two tables i.e. tab-23 and tab-50010(custom).  If i write code on OnModify trigger on table 23 then it only works for fields those are related to this table but if i change anything in other field then status doesn't update.

    E.g - Address - tab-23- If i change then Status change to Unauthorized

           Additional Name-Tab-50009 but added in same vendor card page- Status doesn't change

    Appreciate your help.

    Thanks,

    Zoe

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: Vendor page modify

    Didn't you add code to the OnModify Trigger of the No. field? Pull down, you can find the OnModify Trigger of this table, adding to it should solve the problem.

    https://learn.microsoft.com/en-us/dynamics-nav/onmodify-trigger

    Thanks.

    ZHU

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

Featured topics

Product updates

Dynamics 365 release plans