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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance forum

Vendor On Hold

(0) ShareShare
ReportReport
Posted on by 4

Hello Guys,

Currently when creating vendor , by default On Hold field value is set to No.
Requirement is On creating vendor, it should automatically set to hold, so that all users can't use it till admin check and remove the hold.
In On Hold field Value have below options
 
  • No â€“ No holds have been put on the vendor.
  • Invoice â€“ No invoices can be posted for the vendor.
  • All â€“ The vendor is on hold for all transaction types. These transaction types include purchase requisitions, invoices, and payments.
  • Payment â€“ No payments can be generated for the vendor.
  • Requisition â€“ Only purchase requisitions can be created. No other transactions can be created.
  • Never â€“ The vendor is never put on hold for inactivity.

I need to set All  option  by default  for Hold the vendor.

How to achieve this .

Please suggest .
 
  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    That's possible with a simple customization, using Chain of Command or post event handler on the initValue method of VendTable.

  • Naveen Mishra Profile Picture
    4 on at

    Hi Nikolaos Mäenpää ,

    Thanks for response.

    init value from VendTable form or Table ?

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    It depends on what you want. Do you want your logic to run only when vendor is created on VendTable form? If yes, add your code to the form. If no, add it to the table.

  • Naveen Mishra Profile Picture
    4 on at

    Hi ,

    I have written below code  , but not working .

    /// <summary>

       ///

       /// </summary>

       /// <param name="args"></param>

       [PostHandlerFor(tableStr(VendTable), tableMethodStr(VendTable, initValue))]

       public static void VendTable_Post_initValue(XppPrePostArgs args)

       {

           VendTable vendTable = args.getThis() as VendTable;

           vendTable.Blocked = custVendorBlocked::All;

       }

    Please suggest if any thing is missing .

  • Verified answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Naveen,

    Rather than coding something here, would it be an alternative to create vendors only with the help of templates that have the default value set to 'all'?

    You did not provide too much details on the process and maybe the template feature will already do the job?!

    Best regards,

    Ludwig

  • Suggested answer
    Khushhal Garg Profile Picture
    1,514 on at

    Can you debug and see if 'VendTable_Post_initValue' method is getting called? If not, build the model

  • Suggested answer
    simonsmith101 Profile Picture
    6 on at

    Great suggestion Ludwig. Is there a way of making vendor creation ONLY possible by using a template? (security duty ?) Thanks

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello Simon,

    You have usually the option to select also a default (blank) one when you make use of templates. 

    Vend2.png

    Of course you can select the don't ask parameter but then there will be only this template used. 

    Might be better having a central team that sets up vendors - if possible of course. 

    Best regards, 

    Ludwig

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans