Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get ID's of multiple imported SalesOrderLines #647

Open
KC031 opened this issue Jul 9, 2024 · 2 comments
Open

Get ID's of multiple imported SalesOrderLines #647

KC031 opened this issue Jul 9, 2024 · 2 comments

Comments

@KC031
Copy link

KC031 commented Jul 9, 2024

Dear all,

I'm currently working on the following: we make some custom made items for our customers where we have to take a variable quantity of items out of stock. As this sometimes overlaps with the sales of these items, we would like to have one order in Exact where we add lines for each item we might need with its approximate quantity that we need. That way, Exact knows that this item is reserved for a customer.

However, I haven't quite managed yet to extract the ID of multiple SalesOrderLines out of Exact of the lines I have added to this order. Is there a way to get all the ID's of the inserted SalesOrderLines without having to insert them one by one (taking the limits into account).

I need the ID's of every single SalesOrderLine, because when the custom made item has been made, we import a StockCount in Exact, taking out of stock all the items we needed and then I want to delete the lines of the reserved items for this order.

Thanks in advance for your feedback!

@remkobrenters
Copy link
Collaborator

Is it not as simple as create the salesOrder, let Exact Online make the SalesOrderLines and than fetch the SalesOrderLines that belong to the created SalesOrder? Should be fairly fast and with only a few API calls (for example using the bulk endpoint and some oData filters).

@KC031
Copy link
Author

KC031 commented Aug 2, 2024

I don't think it is (but I can be wrong of course). Please see below a more detailed example of what I would like to do.

Work order 1 needs the following:

  • 3.5x item A
  • 2x item B
  • 6x item C

Work order 2 needs the following:

  • 9x item A
  • 10x item D

When I add the items to the SalesOrder in Exact (it's always the same order, for all different work orders), I want to add it line by line:

  • 3.5x item A (Work order 1)
  • 2x item B (Work order 1)
  • 6x item C (Work order 1)
  • 9x item A (Work order 2)
  • 10x item D (Work order 2)

That's why I would like to be able to retrieve the id's of the lines I have just inserted, to be able to delete this line from the SalesOrder once the work order has been made. I hope this makes sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants