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 | Project Operations, Human Resources, ...
Answered

How can I update the Vendor ID with new number seq by sql via code?

(0) ShareShare
ReportReport
Posted on by 162

I want to update the vendor id across all the legal entities according to the custom number sequence defined. Can any one please share how one can fetch the number sequence of vendor ID via code?

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi Harshal, Please check below article. There is a method numRefVendAccount in VendParameters table.

    community.dynamics.com/.../how-to-find-next-value-from-sequence-number-when-sequence-number-reference-not-in-parameter-table

  • Harshal Jain Profile Picture
    162 on at

     sequence = NumberSeq::newGetNum( NumberSeqReference::findReference(extendedTypeNum(VendAccount)));
     info(sequence.num());

    Hi Mohit,

    I have used the following code to generate the number sequence, but its returning blank. Any suggestions?

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Please check if number sequence for vendor account is setup in Account payable parameters.

    pastedimage1682639578604v1.png

    Check the number sequence is setup properly, please try this code and debug where its failing. Also, please check if number sequence is working correctly when vendor is created manually from All vendors form.

    _sequence = NumberSeq::newGetNum( VendParameters::numRefVendAccount());

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... 510 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 399

#3
Adis Profile Picture

Adis 251 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans