Manuais
PHC GO Funções SDK - Navigation
 

Navigation


 
 

Description

This function is used to navigate to a particular custom process.

Return Function

n/a

Parameters


Name Description Type
customProcessStamp Custom process stamp we want to navigate. String
operation The custom process state we intend to navigate (new or view). String
stamp If it is a record custom process, it must contain the record stamp.
This parameter is optional.
String
payload An object that will be available server-side for additional information. {[key: String]: String}

Example


New emission of a particular custom process.

sdk.navigateToCustomProcess("z202111051646081460033921","new");




Description

This function is used to update a given mainform.

Return Function

n/a

Parameters


Name Description Type
entity The mainform’s entity name we want to navigate. String
series If the mainform uses series number, this parameter must have the desired series number.
This parameter is optional.
Number
operation This parameter is optional and corresponds to the mainform state we intend to navigate. ENUM MainFormOperationTypes (VIEW, EDIT or NEW)
stamp If operation is VIEW or EDIT, this parameter should have the stamp of the particular record to be viewed or edited. String

Example


The following example shows how to navigate to customer screen to check a particular customer record.

// Gets customer number 2 stamp

let query = new QueryVO();
query.entityName=TABLES.CL;
query.SelectItems.push(FIELDS.CL_CLSTAMP);

query.filterItems.push({...new FilterItem(), filterItem: FIELDS.CL_NO, comparison: Comparison.EQUAL, valueItem: 2});

sdk.runQuery(query).subscribe(value => {
if(PHCResult.ok(value) && !!value.result.length) {

// Navigates to customer mainform to view customer number 2 record

sdk.navigateToMainform(TABLES.CL,undefined,MainFormOperationTypes.VIEW,value.result[0].clstamp)
}
});




Description

This function is used to navigate to a particular analysis.

Return Function

n/a

Parameters


Name Description Type
analyticStamp This parameter is mandatory and corresponds to the stamp of the analysis we intend to navigate. String
recordStamp If it is a record analysis, it must contain the record stamp.
This parameter is optional.
String

Example


The following example navigates to the analysis 129

let analyticStamp = "cee-4e2b-bc70-abbb493c6a6"; // Analysis 129 – Dossiers internos deste cliente
sdk.navigateToAnalytic(analyticStamp,currentRecord.clstamp);




Description

This function is used to navigate to a particular listing.

Return Function

n/a

Parameters


Name Description Type
listingStamp This parameter is mandatory and corresponds to the stamp of the listing we intend to navigate. String

Example


The following example navigates to a specific listing.

sdk.navigateToListing("9bc-46e4-a7ea-60139f9d44d")