AgilizTech’s customization for bpm’online – Look up filtration based on flag in mobile app

In this fourth post of the series we will be discussing how to list only active products in the product selection page of the bpm’online sales enterprise edition mobile app.

The product section in mobile app has provision to activate or inactivate the products. In the desktop version if a product is inactivated, it will not list in any product selection page. In mobile page, however by default the product will be listed.

Business use case:

To display active products only in the production selection while booking orders through bpm’online mobile app.

Product:  bpm’online sales enterprise edition

Applicable for Version: 7.13 & above

Below is the desktop version of bpm’online sales enterprise wherein you can see that the Product Inactivated does not appear in the product selection page.

Fig 1: Product Inactivated

Whereas in the product selection page of the bpm’online mobile app the inactive product will be listed. This can be corrected by applying a certain code.

Fig 2: Before applying code change, product will be listed in mobile product lookup

Fig 3: After applying the code change, product will not be listed in lookup

Filtration of lookup columns based on the flag or a column is demonstrated below.

You should be knowing in which Workplace the changes need to be done. Select the workplace first to apply the changes.

In Custom package > MobileApplicationManifestDefaultWorkplace

For Example:

UsrMobileFilterModelConfig – If this is the business rule created for filtering the columns based on other columns, then you will have to mention this name in Model > Object’s Page Extension section.

Refer below code:

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

Create a module with the specified name. In this example it is UsrMobileFilterModelConfig.

In UsrMobileFilterModelConfig. module write the business event for Accessibility.

Find the code below.

Terrasoft.sdk.Model.addBusinessRule(“OrderProduct”,{
ruleType:Terrasoft.RuleTypes.Filtration,
events:[
Terrasoft.BusinessRuleEvents.Load,
Terrasoft.BusinessRuleEvents.Insert,
Terrasoft.BusinessRuleEvents.ValueChanged
],
triggeredByColumns:[“Product”],
filters:Ext.create(“Terrasoft.Filter”,{
modelName:”Product”,
property:”IsArchive”,
value:false
})
});

Here we are filtering “Product” lookup column in Order Products, based on Is Archive field in the product object. If the value is false, product will be listed; if value is correct i.e. if product is inactive, it won’t be listed. This Filtration should work while inserting new order, i.e. selecting a product for new order and while editing order product list for an existing order.

The event handling is explained below:
Find the code below.

events:[
Terrasoft.BusinessRuleEvents.Load, //On Data Load
Terrasoft.BusinessRuleEvents.Insert, //upon inserting new
Terrasoft.BusinessRuleEvents.ValueChanged //While Editing
]

Hence, if the above code is applied the inactive products will not be listed in the mobile product look up.

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

AgilizTech’s Customization for 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 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.

bpm'online

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

bpm'online

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 bpm’online customization use cases.

stealing your personal data

Are apps stealing your personal data? Part Three

In the last two posts, we explored how some mobile apps were malicious in nature and indulged in stealing your personal data for their gains. We also looked at a few steps that mobile app developers can undertake to bring stronger, more resilient mobile apps that don’t support dangerous activities of hackers.

In this final part, we will understand what you as an end user can do to stay vigilant and prevent mobile apps from stealing your personal data.

Note to end users – How to hackproof your smartphone

Fingerprints can be lifted. Use passcode

One of the biggest nightmares for an individual these days is losing their phone. While the hardware must have cost big bucks, what’s more vital is the loss of personal data that’s present – think emails containing sensitive information, photos, videos and more. While most of us secure our phones with fingerprints, it is not always safe as it is easy to lift prints. It is better to use strong passcodes. And if you have an evil twin, it is time to say goodbye to facial recognition as an unlocking medium as well.

Also, while smart unlock features such as unlocking phone when you reach home/office is cool, it is dangerous when your phone is in the wrong hands.

 

Activate Find My Device feature so that even if physically lost, phone can be locked or wiped

Another way to proof your data in the event you have lost your device is to track it online and lock it. You can even wipe it fully so that the hackers cannot glean anything from it. In Android, Find My Device helps to locate the device as well as lock it or wipe it. iPhone users can use Find my iPhone feature to locate their devices and even switch on Lost Mode.

stealing your personal data

Don’t reveal sensitive data while on Public WiFi

Never use Public WiFi to perform financial or business transactions as hackers can position themselves between you and the connection point and intercept sensitive personal and corporate data. Always use secure connections while performing such activities. According to a Kaspersky Lab report, one in five persons has been a target of cybercrime while abroad and a third (31 per cent) of them are senior business managers.

stealing your personal data

 

Review app permissions and EULA before installing

It is important to review what all permissions an app is requesting before completing installation. As said before some apps seek permissions for internet and location just to send targeted ads and make money. And before you know it, your phone is filled with unwanted ads.

 

While mobile apps have been a boon to smartphone users around the world, the security risks associated with them cannot be denied. It is in your own personal interest that you monitor your apps and eliminate those that you think might compromise your data’s safety. Also, lesser the number of apps and lesser the number of distractions, the more organized your phone and well-spent is your time.

Bitnami