https://netsuiteprofessionals.com logo
#suiteflow
Title
# suiteflow
j

jen

04/28/2022, 8:49 PM
I’m trying to use a Sublist Action Group for the first time in a Sales Order Workflow and I’m a bit stuck. We have a custom field on Vendor that is a checkbox called
Disable Drop Ship
. My Workflow has a checkbox field that should be true if any lines on the Sales Order are set to be Drop Shipped to a vendor that has
Disable Drop Ship
ticked. I’ve added a Set Field Value action to my Sublist Action Group, but I can’t figure out how to add a condition that’s
PO Vendor : Disable Drop Ship = 'T'
a

AI1

04/29/2022, 1:22 AM
In the condition you should be able to select Vendor as the record And Disable Drop Ship as the field Checked as the condition (or True)
j

jen

04/29/2022, 2:58 PM
That doesn’t seem to be the Line Item PO Vendor though…?
I need to check the PO Vendor on each line one by one
a

AI1

04/29/2022, 3:11 PM
Oh I see your looking at sales orders...duh. I think you would need to source the Vendor record into a custom list field on your SO lines. Then you could do the condition
You could try to create a Custom Column field (list/record; type: Vendor or Entity) then do a set field value WF action on your new custom column field with the formula CASE {applyingtransaction.type} WHEN 'Purchase Order' THEN {applyingtransaction.mainname.id} END
I've gotten this to work before, but it sometimes repeats the same value from the first line item onto all line items so it can be inconssitent.
Also you may not be able to get this to populate upon creation of the SO/PO because the PO creation happens server side in the background, so at most this would only work on After Record Submit, but if not you will probably have to make a separate scheduled WF that will scan for all SO's with drop ship PO's attached then run the above WF action to set the PO Vendor on each SO line. It's not great but it can run every 30 min so not terrible.
j

jen

04/29/2022, 3:21 PM
we are checking this before creating the POs
when the vendor has been assigned
it’s the
povendor
value
a

AI1

04/29/2022, 3:28 PM
So povendor is a custom field on the sales order?
j

jen

04/29/2022, 3:51 PM
nooo?
Our NS is heavily customised so maybe we do things a bit differently, but when we are setting up the Sales Order we pick, for each line, the vendor for that item. The value (vendor id) is stored in the
povendor
column. It’s not a custom column.
everything is non-inventory
PO Vendor is a column in the items sublist
a

AI1

04/29/2022, 4:25 PM
When you say ".....we pick, for each line, the vendor for that item...." isn't that a custom field on the line item where you select the vendor? Or is it more customized than that?
j

jen

04/29/2022, 4:42 PM
it’s not a custom field
it’s just one of the columns, like
quantity
,
amount
etc
defaults to default vendor for item but you can override
a

AI1

04/29/2022, 4:53 PM
Ok I guess disregard what I was trying to get to as that wasn't the end goal. I was just trying to understand HOW you are selecting the vendor for each line, and from your above comments you made it sound like there were 2 fields on each line, 1 to select the Vendor and 1 to store the Vendor ID and the povendor field was the "storing the Vendor Id" one. However, either way my thought would be one of 3 things. 1. Can you make a custom checkbox field on the SO line that is sourced from a join to the PO Vendor Field to get to the disable drop ship checkbox. 2. Or if that doesn't work make a saved search that looks for Sales Orders with the PO Vendor field filled out and then also join to the disable drop ship checkbox using the Vendor (Line) fields.... join to find when Disable drop ship is T. Then you can use that saved search as a condition for your action or trigger. 3. Lastly, maybe CREATE a custom line field to select your vendor instead of using the PO VEndor field. Usually custom fields are more accesible to workflows than some native fields, which NetSuite does not expose to workflows. Then you can find your new custom field in the WF condition
j

jen

04/29/2022, 5:10 PM
One of those might work, but really my question is more me trying to learn how to use these Workflow Sublist Actions, which I haven’t done before.
I don’t really want to add a bunch more fields/logic. Really it’s just gonna be “show button” or “do not show button” on WF if at least one item is set up to drop-ship to a vendor that has drop ship disabled. I won’t get into all the details on how the povendor is actually set as that’s quite complicated on our end (it’s not actually really vendors per se, it’s insurance contracts, and the item lines are types of insurance coverage, etc)
a

AI1

04/29/2022, 5:21 PM
That makes sense. It sounds like the biggest issue you are facing is that NetSuite doesn't expose the PO Vendor (or Vendor (Line) field) to workflows. I have found this for a few other fields as well which is super annoying. That being said you should be able to setup a condition or trigger based on Line fields. However, the sublist group you make is just to manipulate fields in the Items sublist. The sublist group doesn't have any actions in it that effect "header" fields or functions. I have found that the best way to use sublist data to trigger actions on the "header" level or transitions or buttons is to use a saved search criteria. That is fairly low impact because it's just a saved search and not a bunch of extra fields floating around. If this doesn't answer your question specifically, then maybe let me know what WF Action you are trying to use or want to know more about...I'd be happy to let you know what I've experienced with them.
j

jen

04/29/2022, 5:26 PM
I’m not really sure what you mean by “header” fields here. The action I need to do is a
Set Field Value
(I’ll be setting a workflow field to true if it finds any lines that match my above criteria). Basically quite similar to this https://followingnetsuite.com/2019/01/29/suiteflow-sublist-action-group-example/ except instead of checking “expected ship date is empty” on any line, I need to check “povendor for line is not a “disabled drop ship” vendor”.
yeah I’ve encountered problems with
povendor
not being exposed before
suspect it won’t be possible and I’ll have to script this, but thought I’d give it a whirl this way just in case.
a

AI1

04/29/2022, 5:35 PM
Ok yeah this makes sense. This would have definately worked if the PO Vendor field was accessible to the WF. But since it's not his solution won't be possible. The saved search option will work for sure though...I'd give it a try before scripting as a saved search would be much easier to build then a script (at least for me it is, I can't write script...😋) Just make a transaction saved search that returns the results you are looking for (Sales Orders with Vendors in the PO Vendor field AND that vendor has Drop Ship disabled = T) .....then use it as your condition
119 Views