mobile application
7.14_()
studio

Hi Community,

In mobile application we can show/hide field using business rule but how we can configure that field will only show in edit page and it will be hidden in preview page.

 

Thanks

 

Like 0

Like

1 comments

Hello Fulgen,



Unfortunately, field visibility can not be changed via sdk.

All other preview page parameters can be changed by means of:

Terrasoft.sdk.RecordPage.configureColumn("Account", "primaryColumnSet", "Name", {

customPreviewConfig: {

}

})

In your case you can try to create your CardViewGenerator:

1) Create new schema of "module" type with the name UsrMobileCardViewGenerator

2) Add this code inside:

Ext.define("Terrasoft.configuration.UsrMobileCardViewGenerator", {

extend: "Terrasoft.ViewGeneration.CardViewGenerator",

generateColumnItems: function(columnSetConfig) {

var columnItems = this.callParent(arguments);

if (this.getModelName() === "Account" && this.getMode() === Terrasoft.CardViewModes.Preview) {

var newItems = [];

for (var i = 0, ln = columnItems.length; i < ln; i++) {

var columnItem = columnItems[i];

if (columnItem.name !== "Name") {

newItems.push(columnItem);

}

}

return newItems;

} else 

return columnItems;

}

}

});

Terrasoft.DefaultCardViewGeneratorClassName = "Terrasoft.configuration.UsrMobileCardViewGenerator";

3) Then add this schema into Manifest of your section:

"Models": {

"Account": {

"PagesExtensions": [

"UsrMobileCardViewGenerator"

]

}

}

Show all comments
mobile application
attachments
7.14_()
studio

Hi Community,

In mobile application I am getting this error "Schema CaseFile is not found" when user of type "Portal User" is previweing the attachement in Case.

Any idea how can I configure this for user of type "Portal User"? By the way for user of type "Employee" attachment preview is working fine.

 

Like 0

Like

5 comments

Dear Fulgen,

As far as I understand you are using the marketplace application. We suggest you to approach the application developer directly via bpmonlinelabs@bpmonline.com for further consultations.

 

Best regards,

Dean

Dean Parrett,

Thanks for your reply Dean

I am not using using marketplace application, I am referring to the OOB attachments in Case (Please see screenshot below). Once you click on the attachment it will allow you to preview the attachment. This is working fine for users of type "Employee" but for users of type "Portal user" i'm getting this error "Schema CaseFile is not found" is there any configuration i need to set up? I already check CaseFie object, "Portal Users" has already access rights on it but I am still getting this error. 

Dear Fulgen,

The only suggestion we have is to debug the preview finctionality using mobile application emulator, analyze the functionality logic and implement it for portal users, since the out of the box version of the application doesn't allow portal users to use mobile app.Unfortauntely, we do not have any solution examples for this reason.



Best regards,

Dean

Dean Parrett,

Thanks Dean,

I tried to debug the preview functionality using mobile application. Both users of type 'Employee' and of type 'Portal users' has the same logic.  It is doing  select query in VwSysEntitySchemaInWorkspace object where filter is 'Name' is 'CaseFile'. This query is returning error "Schema CaseFile is not found" for users of type 'Portal Users'. Case File is already added in the List of objects available for portal users but still this error occurs. Is there any other configuration to where I need to add the 'CaseFile' schema  aside from List of objects available for portal users for this to work?

Dear Fulgen,

Since the portal users are not able to access the mobile app by default, we cannot debug the system and tell you exactly how the portal user should preview the files. Developing the mobile application for portal users purposes might be followed by multiple pitfalls. That is why this option is not available in out of the box version and we do not have any examples for the solution.

Best regards,

Dean

Show all comments
mobile application
7.13_()
studio

Hi Community,

Any idea how we can show user profile in mobile just like what you have in web version.

 

 

Like 0

Like

0 comments
Show all comments

Hi Community,

Any Idea how can I achieve below scenario in Mobile Application.

If case status is "closed", when saving record i need to show pop up message if there is no attachment. 

 

Like 0

Like

7 comments

Dear Fulgen,

You can achieve such task using push notifications for mobile application. Such push notifications are created via business process and corresponding  “Send push notifications” element.

By status change signal on the Case object you read the quantity on attachments on the record, which triggered process and based on the result you show push notification.

Check the following article on step-by-step implementation:

https://academy.bpmonline.com/documents/technic-bpms/7-14/how-set-push-notifications-mobile-application-users

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia, Thanks for your reply

Currently in mobile, we enable the status field in case form. So user can select the status to closed. Now when saving case record on mobile and if status is 'Closed', I need to do some validation if there is attachment in 'CaseFile'. This logic is achievable in web using esq to check if there are records in 'CaseFile' and use 'asyncValidate' method for validation. Now in mobile how can i implement the same logic? 

 

Fulgen Ninofranco,

Please check the following example. There is a query to Contact section, where we select Name, Id, Account. This is the corresponding to ESQ mobile version.

var store = Ext.create('Terrasoft.store.BaseStore', {
    model: 'Contact'
});
var queryConfig = Ext.create('Terrasoft.QueryConfig', {
    columns: ['Name', 'Id', 'Account'],
    modelName: 'Contact'
});
store.loadPage(1, {
    queryConfig: queryConfig,
    filters: Ext.create('Terrasoft.Filter', {
        property: 'Name',
        value: 'test'
    }),
    callback: function(records, operation, success) {
        var loadedRecord = records[0];
        if (loadedRecord) {
            var contact = loadedRecord.get('Account');                                                                                                    
            if (contact) {                                                                                                                   
                ...
            }
        }
    },
    scope: this
});

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia, Thanks for your reply

From which OOB Schema this source code is added?

Fulgen Ninofranco,

Also, here is an example of how to write direct query to database:

// sql requry to DB
var sqlText = "select pf.Id as ProductFolderId from ProductFolder pf " +
    "where pf.FolderTypeId = '9dc5f6e6-2a61-4de8-a059-de30f4e74f24' and " +
    "exists(select pif.Id from ProductInFolder pif where pif.FolderId = pf.Id and exists(" +
    "select p.Id from Product p where p.Id = pif.ProductId and " +
    " p.Active = 1 and p.TypeId = 'f1795fc3-36cc-4771-9222-178b339eb9f2'))";
 
// variable to which results will be stored
var records = [];
 
// executing query to DB
Terrasoft.Sql.DBExecutor.executeSql({
    sqls: [sqlText],
    success: function(data) {
        if (data.length > 0) {
            var columnMap = {
                'ProductFolderId': 'Id'
            };
            var queryConfig = Ext.create('Terrasoft.QueryConfig', {
                modelName: 'ProductFolder',
                columns: ['Id']
            });
          
            var ids = data[0].rows;
            for (var i = 0, ln = ids.length; i < ln; i++) {
                var sqlData = ids.item(i);
                var record = Terrasoft.SqlDataToRecordConverter.convert(sqlData, queryConfig, columnMap);
                records.push(record);
            }
        }
    }
});

You can check MobileCaseGridPageController, MobileActivityActionsUtilities schemas.

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia, Thanks for your reply

For 'asyncvalidate' method in web. What is its counterpart in mobile? I want to execute this esq on click of save button. So I need the same functionality as asyncvalidate in web.

Fulgen Ninofranco,

Unfortunately, there is no exactly same functionality for mobile application. However, you can use business rules instead. I have prepared an example of RegExp validation, hope it suits your task:

Terrasoft.sdk.Model.addBusinessRule('Contact', {
    ruleType: Terrasoft.RuleTypes.RegExp,
    regExp : /^([0-9\(\)\/\+ \-]*)$/
    triggeredByColumns: ['HomeNumber', 'BusinessNumber']
});

Regards,

Anastasia

Show all comments
CSS
mobile application
styles

There are 2 ways on how to add a custom CSS to a mobile application. The first one works globally. The second one can work enter globally or locally in a specific section. 

Global CSS

1. Create a new module in a "Configuration" section. I named it "UsrMobileStyle". Add needed CSS into a "Less" tab for the module.

http://prntscr.com/ofbv8p

2. Open "Mobile application wizard". Change something and save changes. The system will create a new replacing client module for "Manifest". Find the module called "MobileApplicationManifestDefaultWorkplace" in the configuration section.

3. Add the "CustomSchemas" array with the module that was created in the first step to the manifest in the following way:

{

    "SyncOptions": {

        "SysSettingsImportConfig": [],

        "ModelDataImportConfig": []

    },

    "Modules": {},

    "Models": {},

    "CustomSchemas": [

        "UsrMobileStyle"

    ]

}

http://prntscr.com/ofbwh4

4. Save changes, restart the application pool, enjoy.

If it's a cloud application, please email to support@bpmonline.com and ask to restart the application pool. 

If it's a local application, please use the "Mobile application emulator" in order to check the changes

Local CSS. 

The same idea. Please find more information in the article by the link below.

https://community.bpmonline.com/questions/reg-validations-mobile-app

 

Like 0

Like

Share

4 comments

I tried Global CSS and its reflected except home screen which appearing just after successful login. Is it possible to apply custom css on home screen?

Muhammad Shajiuddin,

It's called "login page". Unfortunately, it's not possible to modify a mobile login page. 

Eugene Podkovka,

Please confirm the login page is exist as separate html file which is embedded with mobile app or something else? can we modify it locally?

The login page is an html file that is embedded in mobile app and can't be customized.

Show all comments
CSS
mobile
mobile application
Mobile app

Hi,

 

I need to change background image of mobile home page.

Currently I able to show background image under sections (modified the object "UsrMobileCaseGridPageView") but its not reflected on home page.

 

Image is copied to this loaction (file:///C:/BPM/BPM_Mobile_simulator/7.14.6/appV2/Common/lib/SenchaTouch/resources/css/bg.png)

Please suggest the way it can be achieved. For testing I using mobile simulator.

 

Regards

Like 0

Like

3 comments

The question was discussed in the article by the link below.

https://community.bpmonline.com/articles/adding-custom-css-mobile-application

Hi Eugene,

Thank you, I tried Global CSS and its reflected except home screen which appearing just after successful login. Is it possible to apply custom css on home screen?

Muhammad Shajiuddin,

Unfortunately, it's not possible.

Show all comments
mobile
Mobile app
mobile application
condition rules
rules

hi,

Please find the below link that explains how to enable/disable fields based on condition in mobile app.

http://agiliztech.com/2019/06/24/agiliztechs-customization-bpmonline-enable-disable-field-mobile-app/

 

Like 0

Like

Share

0 comments
Show all comments