is there any reliable way to get list of all `stat...
# suitescript
d
is there any reliable way to get list of all
statusRef
values programatically? i.e. 'fullyBilled', 'closed', 'pendingApproval', 'pendingFulfillment' etc.
c
What are you trying to do with these results?
You can get the status values (e.g.
SalesOrd:B
) and their respective string representations (e.g. Pending Approval) readily via N/search
But as far as the camel case single-word strings you used in your example, I don't know of a way. ¯\_(ツ)_/¯
Unless you want to process the string representation to remove whitespace and lower-case the first letter. There's no guarantee those would be 100% equivalent though.
d
looking at options of fieldId status, orderstatus, & statusRef on Order , statusRef seemed to be the most standard value for comparison (which actually gave some info rather than A, B, C codes) so I just wanted to create some global constants enum file for all of those to check against
b
I think those are related to the soap status, so go through the wsdl
I personally would use the orderStatus letters
d
@battk I also noticed doing a search FormulaText on {statusref.id} & {status.id} it seems to have the same values as well, so it didnt seem to be exclusively soap. I'll definitely check out the wsdl though to see if they're all specified there; ultimately I'm ok with converting to "hardcoded" JS object map ... I just wanted to ensure that I had all the correct statusRefs documented in code