Skip to main content

Notifications

Announcements

No record found.

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

Job Planning Lines with Location Code

(0) ShareShare
ReportReport
Posted on by 2
Hi all,
 
I've setup custom page for Job Planning Lines, and I'm able to GET all Job Planning Lines using the Business Central API.
I'm also able to create new Job Planning Lines for a specific job, however the moment I try to add a locationCode I get the following error.
 
I've done the following.
 
If I POST the following body everything works:
 
{    /jobNo/: /JOB001/,    /jobTaskNo/: /1/,    /lineType/: /Budget/,    /quantityBase/: 10,    /lineNo/: 1000,    /no/: /PRODNO001/,    /type/: /Item/}
 
 
However, I would like to add the locationCode as well, so I tried the following
 
{    /jobNo/: /JOB001/,    /jobTaskNo/: /1/,    /lineType/: /Budget/,    /quantityBase/: 10,    /lineNo/: 1000,    /no/: /PRODNO001/,    /type/: /Item/,    /locationCode/: /SL001/}
 
 
I get the following error: You must specify Item No. in planning line
 
If I change quantityBase to quantity is get the following error: You must specify Resource No. in planning line
 
Does anyone know how to resolve this error?
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 12,920 Most Valuable Professional on at
    Job Planning Lines with Location Code
    Hi
    Is it an API type page?
    In that case,
    Have you developed something specific to indicate what the correct insertion or modification process is?
    I tell you this, because if you review some examples of standard APIs, the insertion process is directed in some way.
    Here is the example of the item API
    This link can give you some hints, i hope this can help.
    Best Regards
    Gerardo

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans