getNavigationBehavior (Client API reference)
Returns a navigation behavior object for a stage that can be used to define whether the Create button is available for users to create other table record in a cross-table business process flow navigation scenario.
Note
This method is available only for Unified Interface.
Syntax
stageObj.getNavigationBehavior().allowCreateNew = function () {
return true|false;
}
Returns
Type: Object
Description: An object with the allowCreateNew
property that lets you define whether the Create button will be available in a stage so that user can create an instance of tableB from the tableA form in a cross-table business process flow navigation scenario.
For example, here is the Create button in the Develop stage of the AccountToContactProcess sample business process flow that lets you create a Contact record from the Account form.
The allowCreateNew
property will return undefined for business process flow records that do not implement cross-table navigation.
Example
The following sample code shows how you can hide or display the Create button for an active stage of a business process flow depending on its name.
function sampleFunction(executionContext) {
var formContext = executionContext.getFormContext();
formContext.data.process.getActiveStage().getNavigationBehavior().allowCreateNew = function () {
if (formContext.data.process.getName() === 'Test Process') {
return false; // Create button is not available
}
else {
return true; // Create button is available
}
}
}
Related articles
Comentários
https://aka.ms/ContentUserFeedback.
Brevemente: Ao longo de 2024, vamos descontinuar progressivamente o GitHub Issues como mecanismo de feedback para conteúdos e substituí-lo por um novo sistema de feedback. Para obter mais informações, veja:Submeter e ver comentários