What is the correct way to generate a vendor bill ...
# suitescript
a
What is the correct way to generate a vendor bill that is connected to a purchase order via SuiteScript (Suitelet specifically)?
s
record.transform()
?
a
Will that allow you to create a vendor bill that is connected to multiple Purchase Orders?
I think if I'm reading it right, that only allows a single transform from one PO to a VB
s
aye
a
yeah we need to create a single bill with multiple POs attached a la the Bill Purchase Orders screen
c
may have to go custom "bill" button route and do it yourself in scripting rather than transform then
a
that's what we're doing
but just not sure the process to set
when navigating to Bill Purchase Orders and selecting multiple POs for the same vendor and submitting, it prepopulates a bill form where there is a parameter of
poids=120010,119810
, so a comma-separated list of multiple POs
wondering if it might be possible to populate that via dynamic mode somehow when initializing the record
I think we may just need to redirect the user to a multi-po transform bill, since we know that works with the url param
and then maybe pass in our own additional param of the lines we want to remove somehow, then a client script to remove lines based on the params
just sucks that there's no SuiteScript analog for a native UI-based process
r
Try using
poids
in the default fields parameter when creating your bills
a
I did try that but it didn't work for me - do you have a code sample that worked for you @rustyshackles?
r
Not a vendor bill but from an SO , my script creates the Drop Ship PO. If I recall correctly, I had to set the poid and linenum in the default values parameter. I'll look for it but this was created during the 1.0 days.
a
interesting - thanks!
m
@al3xicon did you ever find a way to accomplish this? I have a similar use case.
a
Unfortunately no @MoCheeks - our workaround was a client script based on field change, but the user has to start by creating a bill via the Bill Purchase Orders page
m
Were you able to link the multiple POs? @al3xicon
a
yeah because netsuite natively allows for that, but only if you use that screen
m
Ok thanks