Hi folks, Is there a way how to create Cross Subsi...
# suitescript
m
Hi folks, Is there a way how to create Cross Subsidiary Item fulfillments via script? It tells me there are no line items on the fulfillment when I try to save it using transformrecord.
s
I haven't done this, but now that you mention it I too am curious if anyone has an answer?
m
@stalbert looks like it works, but didn't see this documented anywhere: require(["N/record"]); var record = require("N/record"); var rec = record.transform({ fromType: record.Type.SALES_ORDER, fromId: 7055129, toType: "itemfulfillment", isDynamic: false, defaultValues: { inventorylocation: 470 } }); rec.save();
s
Ah, I suspected it would be a
defaultValues
issue - I presume that is what was needed to make it work @Martin Horacek?
👍 1
m
I think the rule of thumb is the url parameters in UI translate to defaultValues in record.create/transform
m
This is however unfortunately unsupported in Webservices. Got a confirmation from NS.
s
Do you have a workaround for SuiteTalk?
m
@stalbert I had to create a Restlet in NS that will do what's required.
s
bummer that. I wonder if the 'REST' flavored SuiteTalk can do it.