Skip to main content

Notifications

Community site session details

Community site session details

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

Package validation error - Adding Field to Sales Invoice Header

(0) ShareShare
ReportReport
Posted on by 2

Hello, 

I created a solution that works perfect in Sandbox. 

When I try to push to production I get the following error - 

Package validation failed due to the following error(s): (11,21): error PTE0002: Field 'Shipping Agent Service Code' has an ID of [5794]. It must be between within the range '[50000..99999]'.

Here is the code - 

pastedimage1644425762231v1.png

Any Thoughts? 

Thanks, 

Dustin

  • Suggested answer
    YUN ZHU Profile Picture
    81,422 Super User 2025 Season 1 on at
    RE: Package validation error - Adding Field to Sales Invoice Header

    Hi, you need to change the field id to 50000~99999 range.

    This is a bit different from the idea in NAV. In NAV, we always add the same ID as the standard, which can automatically transfer data when TransferFields is run.

    But now in SaaS, if you need to add fields to standard tables, you cannot use IDs from 1 to 49999 range, because Microsoft may use them at any time in future versions.

    PS: There is no limit for your new table, you can use 1~49999.

    pastedimage1644458220878v1.png

    Hope this info will help.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Package validation error - Adding Field to Sales Invoice Header

    I think it might work in a sandbox because there is simply less validation going on there.

    But as Kim says. All the Per Tenant Extensions must  be in the 50000 to 99999 range also when it comes to new fields added and objects added.

  • Dallefeld Profile Picture
    175 User Group Leader on at
    RE: Package validation error - Adding Field to Sales Invoice Header

    Seems like its fussing about the line that has field (5794; "shipp...............

    If you are adding the shipping agent service code field to you're new table, you have to use a different field number int he 50000..99999 range.

    Not sure how this can work in Sandbox and not production though.

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,125 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,871 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans