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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

SiteID and quantiy ordered error creating a sales order using Business Object - SL 2011

(0) ShareShare
ReportReport
Posted on by

Any idea why  an error pops when attempting to create an order using Business Objects? (I'm passing all parameters including SiteID and quantities)

The error is:

"The site ID must be assigned at the schedule level when there are multiple schedules.The quantity ordered must be assigned at the schedule level when there are multiple schedules."

Happens with any order. Both qty ordered and siteID are passed along with all order info. Entering same type of orders manually does not pop any errors of course. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mark E Profile Picture
    6,451 on at

    Without seeing/knowing how your import model is built, or the data included in the import, the message suggests that there is more than one "Schedule" for each imported Line Item.  The Schedule is subordinate to the Line, and can facilitate multiple requested shipping dates for a single Line Item.

    When there is only 1 shipment schedule per Line Item, the Sales Order entry process duplicates the line item data down to the Schedule, and does so without the user knowing it is happening.

    I would review the program and data to see if it is trying to insert multiple shipping schedules per Line.

  • Community Member Profile Picture
    on at

    Thanks for your response Mark !

    It was giving the error for attempting to insert a sales order with only 1 item. I am and not passing anything additional to have multiple schedules per Line.   Not sure what did you mean by the SO entry process duplicating line items data in the schedule....

    I use these instructions once per item in an order

    oLineitem.invtid = sinventoryid

    oLineitem.qtyord = quantity

    oLineitem.ccurryslsprice = unitprice

    As I am in a time crunch, I decided to redo the logic using Object Model instead of Business objects... still testing, but did not get the error and at least now I have the order inserted. But time will come when I need to switch back..

  • Suggested answer
    Mark E Profile Picture
    6,451 on at

    By SO Entry process, I mean when a user enters a new line item for a Sales Order.  I only mention it as many people do not know the schedule functionality even exists if they never utilize it, but an entry in the Schedule (SOSched table) is always made.

    You can always explicitly update the oScheditem.qtyord and the oScheditem.siteid (i'm guessing on the names, but you get the idea...) for each line item being passed.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans