Hello people, I've created a Sales Order workflow...
# suiteflow
s
Hello people, I've created a Sales Order workflow which has a Transform Record action to create an RMA. I'd like the RMA to be created with an 'orderstatus' of Pending Receipt but I don't seem to be able to see this. Whacking in a formula nlapiSetFieldValue('orderstatus', 'B'); results in a suitescript error. Is this even possible to do in a workflow or am I wasting my time? Thanks!
a
You can’t change the status of a transaction using workflows directly. (Like you can’t manipulate the status field). But you can set other fields on the record to get it to change What status is it being made in?
👍 1
s
Figured as much. Our RMAs default to pending approval for other areas of the business but I'm working on a new use case where I'd like to automate the RMA record and IR creation where the approval step is a hurdle. Though after a word with our Service team it sounds like they don't actually use approvals correctly so I'm considering changing the default status across the board to 'Pending receipt'
a
If you have approval routing setup for RMA then set the Approval status field to approved in your transform record action
👍 1
s
I'll give it a bash, tks.
j
It’s not 100% true that you cannot change the statues via WF Custom Action. I have an SS2.1 WF Action Script that approves sales orders and does a bunch of work creating and editing the invoice and bills afterwards. Pretty much the first thing it does is
Copy code
so.setValue({fieldId: 'orderstatus', value: 'B'});

	    	so.save();
👍 1
s
Thanks Jen, I'll look at a WF action script as I'd rather that than change settings account wide for a single use case.