Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

List Code of the specified record. Returns NULL if nothing is found.


call

The Custom API and Custom Events Logic can invoke the Write methods for API types endpoints by using the call function. This function allows passing data from the Custom API or Events logic to the API logicendpoint.  When invoking this from the Custom API this feature allows you to reformat the incoming API data - perform data validation and lookup and then handoff the properly formatted data to write data.  When invoked from a Custom Event it allows scheduled or triggers events to update this data.call functions will follow the same API permissions granted the API Key that is being used. 

Code Block
languagephp
/*
$apiFunction Options: 
  saveService, saveServiceDesk, saveContact, saveCable, saveGla, saveEquipment, saveLocation,
  renderCustomReport, renderCableViewPath
*/

array $this->call (string $method, array $params, bool $commitOnSuccess)

...

$commitOnSuccess A True/False value telling PCR-360 whether to save changes after a commit the database transaction successful call or not. When True, if a call is successful, PCR-360 will commit the change. When not provided with a True, the function will assume False is desired, and if an error occurs down the line, any successful changes will be rolled back. This parameter is ignored for Custom Validations.

Return Values

The function returns a result array containing 'data' which specifies the outcome of the call. For a successful call to saveServiceDesk, this array contain the Service Desk item/action that was created.

...