Manuais
PHC GO Funções SDK - Records
 

Records


 
 

Description

This function is used to update a particular record in order to update its available actions.

Return Function

n/a

Parameters


Name Description Type
record The record to update. any

Example



sdk.updateViewRecord(currentRecord);




Description

Creates a new record from a particular record.

Return Function

n/a

Parameters


Name Description Type
sourceEntity Source entity name. String
sourceStamp Source record stamp. String
targetEntity Target entity name. String
targetSeries If the target entity uses series number, this parameter must have the desired series number. This parameter is optional.
Number
payload An object that will be available server-side for additional information. Any

Example


The following example show how to create a new customer from a refinterna record

sdk.createRecordFromReference(TABLES.REFINTERNA, currentRecord.refinternastamp, TABLES.CL, undefined, {additionalObs: "Record created by createRecordFromReference function"});




Description

Runs a specified business rule configured as “A Pedido”.

Return Function

n/a

Parameters


Name Description Type
Record The itemVO business rule object. GenericVO
bizRuleID The business rule’s unique code ID. String
payload An object that will be available server-side for additional information. any

Example


The following example runs the business rule with id u8882_updatecl

sdk.runBusinessRuleOnDemand(currentRecord,ENTITY_RULES.U8882_UPDATECL);