Get single line by unique key
pepperi.api.transactionLines.get(
{ key: {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8"} ,
fields: [ "UnitsQuantity" , "Item.ExternalID"] } )
{success: true,
object:
{UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" ,
UnitsQuantity: 34 , Item.ExternalID: "ABCD123"
}}
Search list of Transaction Lines by filter
pepperi.api.transactionLines.search({
fields: ["Transaction.UUID", "ExternalID", "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
})
{success: true, objects:
[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ExternalID: "abc123", MyTSA: 12.8},
{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ExternalID: "abc456", MyTSA: 34.5}
] }
Search list of Transaction Lines by Transaction filter and Transaction Lines filter
The purpose of this function is to enable fetching transaction lines of transactions not loaded yet to memory.
pepperi.api.transactionLines.search ({
fields: [ "UUID", "ExternalID" , "MyTSA"] ,
transactionFilter : { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",
Values : ["7"]},RightNode:{ApiName: "ApiName2",
Operation: "InTheLast", Values: ["4","Weeks"]} }
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})
{success: true, objects:
[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ExternalID: "abc123", MyTSA: 12.8},
{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ExternalID: "abc456", MyTSA: 34.5}
] }