JS Client API
  • Getting Started
  • Rule Engine Unique Functions
  • Custom Form Window Functions
  • Known Issues
  • Use Cases & Code Samples
  • Retrieving Data
    • Retrieving Standard Resources
    • Retrieving User Defined Tables
    • Retrieving Attachments
    • Retrieving Items in Transaction Scope
    • Retrieving Transaction Lines
    • ADAL
  • Updating Data
    • Adding Objects to Standard Resources
    • Updating Standard resources
    • Updating User Defined Table
    • Updating Items in Transaction Scope
    • Adding Transaction Lines
    • Removing Transaction Lines
Powered by GitBook
On this page
  • Get single transaction-scope item
  • Search list of transaction-scope items by filter

Was this helpful?

  1. Retrieving Data

Retrieving Items in Transaction Scope

Retrieving Transaction-Scope Items (Order Center Items)

Get single transaction-scope item

transactionScopeItems are items in the "order center" they are different in the way they are retrieved since they require transaction AND item keys

You can get specific item by UUID/ExternalID/InternalID

pepperi.api.transactionScopeItems.get(
{ transaction:{UUID:"<transaction UUID>"}, 
  item: {UUID:"<item UUID>"},// {ExtrenalID:""}/{"InternalID":123}
  fields:["Price", "Item.Name"] })

Returns:

{success: true,
 object: 
 {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" ,
 Price: 123.4 , Item.Name: "Item AB Test1"}}

Search list of transaction-scope items by filter

Supported from CPI 16 only!

To retrieve multiple objects use the search function for the desired resource - it returns the following object:

pepperi.api.transactionScopeItems.search (
{
transaction:{UUID:"<transaction UUID>"},
fields: [ "UUID", "ItemExternalID" , "MyTSA"] ,
filter: { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",
          Values : ["7"]},RightNode:{ApiName: "ApiName2",
          Operation: "InTheLast", Values: ["4","Weeks"]} } ,
sorting : [{Field: "MyTSA",Ascending: true},{Field: "MyTSA2",Ascending: true }]  ,
pageSize : 1000 , page: 1
});

Returns:

{success: true, objects: 
[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ItemExternalID: "abc123", MyTSA: 12.8},
  {UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ItemExternalID: "abc456", MyTSA: 34.5}
] }
PreviousRetrieving AttachmentsNextRetrieving Transaction Lines

Last updated 4 years ago

Was this helpful?