Copy record Id failing
I have the following script on a button. Everything copies over except the record Id. Any ideas on why? The target newInventory.(PurchaseItem := me.Id);, is a number. No errors are apparent.
let me := this;
let newInventory := (create Inventory);
newInventory.(Item := me.Item);
newInventory.('Timestamp IN' := now());
newInventory.(Unit := me.'Pkg Type');
newInventory.(Condition := 2);
newInventory.(Quality := 2);
newInventory.(Price := me.Subtotal);
newInventory.('Sales Tax' := me.'Item Sales Tax');
newInventory.('Shipping Cost' := me.'Item Shipping');
newInventory.(PurchaseItem := me.Id);
me.(Inventoried := true)
Thanks - Mike
4 replies
-
you can try just using me instead of me.Id.
-
Changed -
newInventory.(PurchaseItem := me.Id);
to
newInventory.(PurchaseItem := me);
Still did not copy record Id to PurchaseItem. -
Changed to - newInventory.(PurchaseItem := number(me.Id));
This resolved the issue. Thank you.
Content aside
- Status Answered
- 2 mths agoLast active
- 4Replies
- 33Views
-
3
Following