We utilise multiple No. Series for products in addition to division, item categories and retail product codes (this maybe an LS addition). When adding a new product from the UI any No Series can be selected:
That is fine and functions as intended. However, when you try to replicate this via an API page with the source table as Item (27) it will
always default to the No. Series set in the setup page:

If this is removed, even for testing purposes and an request is sent via the API it will utilise a trigger found on the Item table - specifically this:
trigger OnInsert()
var
Item: Record Item;
#if not CLEAN24
NoSeriesManagement: Codeunit NoSeriesManagement;
#endif
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeOnInsert(Rec, IsHandled, xRec);
if not IsHandled then begin
if "No." = '' then begin
GetInvtSetup();
InventorySetup.TestField("Item Nos.");
#if not CLEAN24
NoSeriesManagement.RaiseObsoleteOnBeforeInitSeries(InventorySetup."Item Nos.", xRec."No. Series", 0D, "No.", "No. Series", IsHandled);
if not IsHandled then begin
if NoSeries.AreRelated(InventorySetup."Item Nos.", xRec."No. Series") then
"No. Series" := xRec."No. Series"
else
"No. Series" := InventorySetup."Item Nos.";
"No." := NoSeries.GetNextNo("No. Series");
Item.ReadIsolation(IsolationLevel::ReadUncommitted);
Item.SetLoadFields("No.");
while Item.Get("No.") do
"No." := NoSeries.GetNextNo("No. Series");
NoSeriesManagement.RaiseObsoleteOnAfterInitSeries("No. Series", InventorySetup."Item Nos.", 0D, "No.");
end;
#else
if NoSeries.AreRelated(InventorySetup."Item Nos.", xRec."No. Series") then
"No. Series" := xRec."No. Series"
else
"No. Series" := InventorySetup."Item Nos.";
"No." := NoSeries.GetNextNo("No. Series");
Item.ReadIsolation(IsolationLevel::ReadUncommitted);
Item.SetLoadFields("No.");
while Item.Get("No.") do
"No." := NoSeries.GetNextNo("No. Series");
#endif
"Costing Method" := InventorySetup."Default Costing Method";
end;
DimMgt.UpdateDefaultDim(
DATABASE::Item, "No.",
"Global Dimension 1 Code", "Global Dimension 2 Code");
UpdateReferencedIds();
SetLastDateTimeModified();
UpdateItemUnitGroup();
end;
OnAfterOnInsert(Rec, xRec);
end;
and within the trigger I believe it is the relation check which is pulling the Inventory setup value and because the value used is different (in this case) it is defaulting to the Inventory Setup value. If you remove the Item Nos. from the Inventory Setup this will return an error (even via the API page) as this isn't set and is required.
On the API page I have tried to do an OnInsertRecord trigger which contains Rec.Insert() which I believe removes default triggers at the table from firing but this does not appear to be executing. I've also tried OnNewRecord which is firing but this removes any of the values from the Rec. e.g if the payload contains Key1: Value1 inside the OnNewRecord this will become Key1: ''.
If doing this manually via the UI this works successfully and a record is inserted with the differing No Series however this isn't always viable for us as there could be 100s of additions over a monthly basis. Wondering whether anyone has had any success in handling this use case OR has a solution to add items via an API page with a different No Series compared to the Inventory Setup set inside the payload?
Thanks!