Error Criteria Object

Administration

This object can be used to request an error response if errors occur when opening a Transaction Line. The "errorCriteria" and its definition are the same as "criteria" parameter, except that the "errorCriteria" parameter is for current resource rather than destination resource.

Note: The "errorCriteria" parameter can only be used in REST services requests for Open Transaction Line and Back actions.

ClosedRequest Sample

"cacheInstanceId":"-1",
  "documents":{
     "quoteText": "abc"
  },
  "criteria":{
    "fields":["lineFloat"],
      "state" true
  },
  "errorCriteria":{
    "fields":["quoteText"],
      "state": true
  },
  "selections":["TransactionLine/2"]
}

ClosedResponse Samples

Response Sample without Error

"documents: {
  "lineFloat": 123,
  "_state": { 
    "attributes": { 
      "lineFloat": { 
        "updatable": true,
        "hasError": false,
        "visible": true, 
        "hasConstraintViolation": false 
      }   
    }
  }
}

Response Sample with Error

"documents": {
  "quoteText": null,
  "_state": {
    "updatable": true,
    "hasError": true,
    "messages": ["Could not perform Action: Open - TransactionLine QuoteText is required."],
    "attributes": {
      "quoteText": {
        "updatable": true,
        "hasError": true,
        "messages": ["QuoteText is required."],
        "visible": true,
        "hasConstraintViolation": true
      }
    }
  }
}

Related Topics

Related Topics Link IconSee Also