Friday, May 17, 2019

Web Services: Transaction Statuses in Search

The format used in a Transaction search with results filtered by Transaction status is different from Transaction status format used in SuiteScript. It doesn't contain just the Status but also the type of Transaction.

For example Sales Order with status Pending Approval can be searched using criteria: "_salesOrderPendingApproval" formatted as string value.

All available statuses are listed in the most recent SuiteTalk Schema Browser:
In top left column select: Records > transactions sales.xsd > [types]
In bottom left column select: TransactionStatus
A list of Transaction statuses will be displayed in the right column.

Since all types are defined as string values they can also be accessed in IDEs like Eclipse or NetBeans as constants of object TransactionStatus defined in WSDL.
Any implementation supporting auto-completion can suggest the correct status; below are two examples for Java and PHPToolkit:

PHP
$searchValue[0] = TransactionStatus::_salesOrderPendingApproval;
Java
tranStatus.setSearchValue(    new String[] {TransactionStatus.__salesOrderPendingApproval});

No comments:

Post a Comment