Hiya Plumsail
We have some code that creates item(s) using data from an Array when a new form is saved.
but we have a problem, when a new form is opened from a dialouge, the item is not created, looking at the network traffic, the request isn't even sent!
the code:
fd.spSaved(function(result) {
if(ParentItemID && itemClass == 'Child'){
for (i=0; i<InventorySupplierDetails.length; i++){
InventorySupplierDetails[i][0].ItemId = result.Id;
InventorySupplierDetails[i][0].Unique_x0020_Ref = InventorySupplierDetails[i][1] + ':' + result.Id;
console.log('Inventory Supplier Details...');
console.log(InventorySupplierDetails[i]);
pnp.sp.web.getList('/sites/COREaaS-OrderSystem/Lists/Inventory%20 Suppliers').items.add(InventorySupplierDetails[i][0]).then(function(result) {
console.log(result);
});
}
}
});
The code works fine in when the new form is not a dialogue, is this a bug? Additionally, the 2 logs to console are displayed with the correct information, it is just the pnp that isn't run at all...
Please help!