Announcements
Hi,
We are using Power Automate to synchronise the item from CRM to BC. We setup the item template in BC API Setup. Items were created successfully with all the preset in item template except the No. Series.
The item created through Power Automate takes the No. Series of ITEM instead of ITEM-CRM. I also tried to create item in BC using the template ITEM_1 and the no. series of ITEM-CRM was used perfectly. So only through the API got that issue. Any idea if I missed any configuration? Thank you.
Hi Steve,
Thanks so much. It clearly shows why the No. Series is not working through API as expected.
We will live with that for now and use item Category to identify the different category of the items. Thank you.
Cheers,
Lillian
Hi Lillian,
I got some help from AJ Kauffman, who showed me where to look for the API code that applies the Templates.
From what I can tell, the BC API page inserts the record first, and then the API Setup code is run to apply the template to update the inserted record. Because the Item is inserted before the Template is applied, it defaults to using the No. Series from the Inventory Setup page.
I am not yet able to decipher the actual template field update code, but my guess is that API Setup does not attempt to use the No. Series from the Template because that would require that it modify (renumber) the existing Item No. value for the new item record.
If my understanding is correct, I can guess why this limitation exists. Presumably re-numbering an existing record is a more involved process.
But on the other hand, that is unfortunate, as I can imagine lots of scenarios where one might want to use different number series for imported records, whether those are items, customers, vendors, sales orders, etc.
I'm now wondering if it is possible to create a custom API that will lookup the Template, retrieve the next number from the No. Series, and assign it to the Item during the API call. Likely possible, but it would be custom.
I reviewed the code for the Items API page and I'm not seeing any code to lookup or use the Item Template from the API Setup page. So it seems that is being done through some other code.
I'm going to check with a friend to see if he knows where the API Setup & Template is being invoked.
Much appreciate. :)
Hi Lillian,
I have setup a few new item number series and configured the API Setup with a few Item Template Codes based on Type and Item Category Code.
I am seeing the same behavior that you describe. Items imported via the BC web API are using the default item number series from Inventory Setup. The API appears to be ignoring the No. Series assigned to the templates and always relying on the Inventory Setup series.
I'm going to review the AL code for the Item API page to see if I can confirm it lacks the code to use the No. Series from the template.
André Arnaud de Cal...
294,095
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator