Category: Creatio

AgilizTech’s Customization for Creatio (formerly bpm’online) – Conditionally Enable / Disable Field in bpm’online mobile app

In this blog we will be discussing on how to conditionally enable or disable a field in Creatio (formerly bpm’online) mobile app.

In this third use case, the user can enter the product details, price and quantity needed, and can edit the total amount field in the order page of the mobile app. The total amount field should be an auto computed one based on the price and quantity given at order product level. To restrict this we have created a code which completely disables the ‘order total amount’ field.

creatio

Figure:1 By default if you add the “total order amount” in mobile page, it will be editable.

creatio

Figure:2 After applying the below code, the field will not be editable.

How to make changes in the page?

To apply these changes and set the corrections, you should be aware of the workplace in which the changes have to be done.

In the Custom package > MobileApplicationManifestDefaultWorkplace select the mobile app workplace where the changes need to be done.

As a business rule, the module UsrMobileDisableModelConfig must be created and you need to write the business event for accessibility.

Below is the code for this customization:

Terrasoft.sdk.Model.addBusinessRule(“Order”,{
ruleType : Terrasoft.RuleTypes.Activation,
events:[Terrasoft.BusinessRuleEvents.Load,Terrasoft.BusinessRuleEvents.ValueChanged],
triggeredByColumns : [“Id”],
conditionalColumns :[ {name :”Id”,value : “Disable All the time”} ],
dependentColumnNames : [“Amount”]

The above code will disable ‘amount’ field which stores the ‘total order value’only if the order ID field is having a value other than the value mentioned in the condition line (i.e. value of ‘Disable All the time’). In this code we have chosen ‘ID’ field as the conditional field, but you can choose a field of your choice as per the business need.

Once UsrMobileDisableModelConfig module is created, we need to place this in the
custom package >  MobileApplicationManifestDefaultWorkplace

For Example:
UsrMobileDisableModelConfig – if this Business rule is created for accessing the columns, then you will have to mention this name in Model > Object’s Page Extension section.

Below is the code:

“Models”: {
“Order”: {
“RequiredModels”: [
“Order”,
“Account”,
“OrderStatus”,
“OrderPaymentStatus”,
“OrderDeliveryStatus”,
“Currency”,
“DeliveryType”,
“PaymentType”,
“LeadType”,
“SocialMessage”,
“OrderProduct”,
“Product”,
“Unit”,
“Pricelist”,
“OrderVisa”,
“VisaStatus”
],
“ModelExtensions”: [],
“PagesExtensions”: [
” UsrMobileDisableModelConfig “, // Module Name
“UsrMobileOrderGridPageSettingsDefaultWorkplace”,
“UsrMobileOrderRecordPageSettingsDefaultWorkplace”
]
},
}

Once the above codes are implemented, the user cannot change the order amount because the field will be disabled.
Click here to navigate to the main blog post which contains the complete list of Creatio (formerly bpm’online) customization use cases.

AgilizTech’s Customizations for Creatio (formerly bpm’online) – Conditionally Hide/Show Fields in bpm’online mobile app

In the second post of this series, we will be exploring a way to achieve conditional visibility of fields in the  sales Creatio enterprise edition mobile app.

Let us take a scenario where the Sales Manager is approving an order in the mobile app. As per business rule, once the Manager has approved the order, he should not be able to reject it. Currently, for approval purpose, ‘Order approvals’ detail is added in ‘order section’ in mobile app. The app allows manager to choose appropriate status in this detail (‘Approved’ or ‘Rejected’). By default, the status will be ‘To Set’. App allows manager to choose ‘Approved’ or ‘Rejected’ status, even after the order has been approved or rejected, which is incorrect as per business rule.

Creatio                               Creatio

We can correct this workflow by hiding the ‘order approval’ status option once the order has been approved/rejected.

Here are the steps to achieve this:
1. In the System Designer, navigate to Advanced Settings and select Configuration.

Creatio
2. Here, in Custom Package, select the Mobile App Workplace, where you want the change to be in effect (here we have mentioned default workplace; if you have created a separate workplace for approvals, select the same).

For example, Custom package > MobileApplicationManifestDefaultWorkplace

Creatio
3. Mention the visibility Module name in the object’s Page Extensions Section.

For Example:
UsrOrderMobileBusinessRules – If this is the business rule created for hiding the columns, then mention this name in Model > Object’s Page Extension section.

Here’s the code:

“Models”: {
“Order”: { {
“RequiredModels”: [
“Order”,
“Account”,
“OrderStatus”,
“OrderPaymentStatus”,
“OrderDeliveryStatus”,
“Currency”,
“DeliveryType”,
“PaymentType”,
“LeadType”,
“SocialMessage”,
“OrderProduct”,
“Product”,
“Unit”,
“Pricelist”,
“OrderVisa”,
“VisaStatus”
],
“ModelExtensions”: [],
“PagesExtensions”: [
” UsrOrderMobileBusinessRules “, // Module Name
“UsrMobileOrderGridPageSettingsDefaultWorkplace”,
“UsrMobileOrderRecordPageSettingsDefaultWorkplace”
]
},
//As we are hiding the ‘OrderVisa’ Status Field in the order screen, the OrderVisa Object is             //also required. In the Model Extension, we have also given VisaStatus Object as this is a              //lookup table for OrderVisa table’s Status field.
“OrderVisa”:{
“ModelExtensions”: [
“VisaStatus”
],
“PagesExtensions”: []
},
}

 

In the UsrOrderMobileBusinessRules module, write the business event for visibility.

Creatio

The code is as given:

Terrasoft.sdk.Model.addBusinessRule(“OrderVisa”,{
ruleType: Terrasoft.RuleTypes.Visibility,
events:[Terrasoft.BusinessRuleEvents.Load],
conditionalColumns: [
{name: “Status” , value: “3462594d-77a7-4b0a-874a-6d8b54b293bc”}
],
triggeredByColumns: [ “Status” ] ,
dependentColumnNames: [ “Status” ]
});

 

Here we are displaying Status field, if the status is ‘To Set’. In case of the other two statuses, (i.e. ‘Approved’ & ‘Rejected’) the ‘Order Approval’ detail, with ‘Status’ field will be hidden, which will stop the manager from changing the status of an approved order to rejected or vice-versa.
The ID value of ‘status’ is hard coded in the above code. The ID value may be different in different instances; hence the value should be cross verified while using this code snippet.

Click here to navigate to the main blog post which contains the complete list of Creatio (formerly bpm’online) customization use cases.

AgilizTech customization for Creatio (formerly bpm’online) – Using Custom Section Filters to view records

This post is in the first of a series that discusses customization of Creatio (formerly bpm’online) for increased efficiency and productivity. In this post, we explore creation of custom section filters to view records.

As per the operational process, sales persons log orders coming from customers in Creatio (formerly bpm’online). These orders must be ‘Approved’ by the sales manager, only after which they will be processed further. By default, a ‘Status’ filter does not exist in the system. The custom filter is required to help the managers to quickly filter out the ‘Pending Approval’ orders from their order list.

Default Filters in a section:

CreatioAfter applying custom filters (order section – status field):

Creatio

Creatio

Steps to create section filters in bpm’online – Quick filter

Let’s now look at how we can create a custom filter in Sales Creatio Enterprise edition, v 7.13.0.284. Here are the steps:

  1. In the Orders page, select open Section Wizard and save the wizard to create a new section page in ‘custom’ package for ‘orders’
      • i)Open ‘orders’ section wizard
      • Creatio
      • ii)Save wizard once

    Creatio

      • iii) New section will be created in custom package; edit this as mentioned in further steps

  2. In OrderSectionV2 Page (Configuration), place the below code snippet in the method block.
initFixedFiltersConfig: function() {
var fixedFilterConfig = {
entitySchema: this.entitySchema,
filters: [
{
name: “PeriodFilter”,
caption: this.get(“Resources.Strings.PeriodFilterCaption”),
dataValueType: this.Terrasoft.DataValueType.DATE,
startDate: {
columnName: “StartDate”,
defValue: this.Terrasoft.startOfWeek(new Date())
},
dueDate: {
columnName: “StartDate”,
defValue: this.Terrasoft.endOfWeek(new Date())
}
},
{
name: “Owner”,
caption: this.get(“Resources.Strings.OwnerFilterCaption”),
columnName: “Owner”,
defValue: this.Terrasoft.SysValue.CURRENT_USER_CONTACT,
dataValueType: this.Terrasoft.DataValueType.LOOKUP,
},
{
name: “Status”,
columnName: “Status”,
caption: this.get(“Resources.Strings.StatusFilterCaption”),
appendCurrentContactMenuItem: false,
dataValueType: this.Terrasoft.DataValueType.LOOKUP,
defValue : “1”,
addNewFilterCaption: this.get(“Resources.Strings.SelectStatusCaption”),
hint: this.get(“Resources.Strings.SelectStatusCaption”),
buttonImageConfig: this.get(“Resources.Images.StatusFilterImage”),
},
]
};
this.set(“FixedFilterConfig”, fixedFilterConfig);
}
  1. A default filter for Period, Owner & status is added. If you need to list the current user name in the filter (as in ‘owner’ filter), set “appendCurrentContactMenuItem” to true.

Creatio

Click here to navigate to the main blog post which contains the complete list of bpm’online customization use cases.