is it possible to change the amount on a line item...
# suitetalkapi
j
is it possible to change the amount on a line item while transforming a PO into a vendor bill using the REST API? it’s possible to do this in UI. you can update the amount on the line item, and it’ll ask you to confirm because the amount is different than the price * quantity on the line. but when i try this in the request, i get:
Copy code
Error while accessing a resource. Please choose an item to add
can’t figure out if this is because i’m adding a new line, which doesn’t exist, instead of referring to an existing one
s
have you tried changing the order? I think submitting item first might work better - i guess from my experience, rest web services feels as if you're working via the UI so the order will take place very similarly? run the item.item sublist first, so submit for id:42 first before the amount, that might change things?
j
hm that’s interesting, so you’re saying put the
"item": {"id": 42"}
above
"amount": 42
?
or are you saying, create the vendorbill first using the transformation, and then patch the amount after?
s
i'd try the
"item": {"id": 42"}
 above 
"amount": 42
in general, say you turn on multisubsidiary customer, you'd always fill the customer on the sales order before you fill in the subsidiary
i mean that's the idea if you know what i mean
i suppose i'd also possibly put line before item, but then again i'm not sure haha
102 Views