Dear Creatio Community,

I am writing to request guidance regarding the utilization of the @creatio/mobile-common library for extending the Creatio mobile application within the Freedom UI framework. Specifically, I am working with Creatio version 8.2.7 (APK).

While the index.d.ts file for @creatio/mobile-common is available on the official npm repository, I am encountering significant challenges due to the absence of comprehensive documentation and practical, live examples demonstrating its use in the context of Creatio mobile app customization.

My objectives involve leveraging this library to achieve advanced customizations and integrations within the mobile platform.

I would greatly appreciate any assistance in the form of:

  • Comprehensive code examples demonstrating the use of @creatio/mobile-common in real-world scenarios.
  • Detailed explanations of the library's architecture and functionality.
  • Guidance on best practices for integrating custom components with the Creatio mobile platform.
  • Information on how to debug and test code that utilizes the @creatio/mobile-common library.

 

Like 0

Like

1 comments

Hello Pranshu,

Our Academy team is currently working on creating articles that present the full information regarding all the questions mentioned.

Please follow for updates on the Academy site to receive all the answers.

Show all comments

Dear Creatio Community,

I am writing to seek assistance with mobile app development within the Freedom UI environment. I am encountering significant challenges extending the mobile app's functionality, particularly due to the current lack of comprehensive documentation and practical examples.

Specifically, I am facing the following issues:

1. Auto-Numbering Issue on Record Page:

  • I have observed that the auto-numbering functionality within the Creatio mobile app behaves inconsistently.
  • When an auto-numbering field is displayed on a record page, the automatic number generation fails.
  • However, if the auto-numbering field is removed from the record page layout, it functions correctly within the list page.
  • I require guidance on how to resolve this conflict and ensure auto-numbering works consistently across both list and record pages within the Freedom UI mobile app. Ideally, a code example demonstrating the correct implementation would be invaluable.

2. Implementing a Resizable Image Component:

  • I need to add a custom image component to the mobile app that allows users to upload images from their native phone's API, similar to an attachment.
  • This component should be resizable to accommodate various image dimensions and screen sizes.
  • I am struggling to find any documentation or examples on how to implement such a component within the Freedom UI mobile framework.
  • I would be very grateful for a working example of how to implement a resizable image component, that interacts with the native phones OS to retrive images.

The current documentation lacks detailed explanations and practical examples for mobile app development in Freedom UI. This makes it challenging to extend the mobile app's functionality effectively.

Any assistance, code examples, or pointers to relevant resources would be greatly appreciated.

Like 0

Like

1 comments

Hello Pranshu,

1. Autonumbering is supported, and there were no registered issues with it before. Please create a case for Creatio Support to review the specific issue that you've faced.

2. Unfortunately, there is currently no mobile component that can display images in a given size, as on the web. At the moment, only attachments are suitable for downloading/uploading images. 
 

Show all comments

The academy has an example of creating a custom UI component

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/remote-module/implement-a-remote-module/examples/add-the-remote-module-to-the-library-of-the-freedom-ui-designer 

There is also a code for the Creatio application that demonstrates how this component works.
 

Question: How can I display this button and the associated field in a mobile app?
What changes need to be made to the app manifest and mobile form code?
 

Like 0

Like

0 comments
Show all comments

Hello Community,

Do you know if it is possible to add a new view in a mobile application that would display a map with multiple markers (where the address would be retrieved from accounts)?
And is there a way to display a custom tooltip on the map containing some information?

Thanks!

Like 0

Like

1 comments

Hello Monika,

 

We don't have any examples available for this. The only example available with maps in the mobile app is the account addresses detail and maps on it (see this community thread).

Show all comments

Hi Team,
I am currently working on creatio mobile app and trying to get the list of roles that are being tagged to the current user in addBusinessRule.But I am not able to get it using Terrasoft.store.BaseStore.
I tried using Try catch block , the error message is empty. Can you please help me regarding this?

 

Terrasoft.sdk.Model.addBusinessRule("Activity", {
    name: "FieldForceActivityTypeRule",
    ruleType: Terrasoft.RuleTypes.Custom,
    triggeredByColumns: ["Type"],
    events: [Terrasoft.BusinessRuleEvents.Load],
    executeFn: function(record, rule, column, customData, callbackConfig, event) {
     var currentUser = Terrasoft.CurrentUserInfo.userId; 
      alert("currentUser: "+ currentUser);
    var modelName = "SysUserInRole";
    var store = Ext.create("Terrasoft.store.BaseStore", {
      model: modelName
    });
    var columns = ["SysRole", "SysUser"];
    var queryConfig = Ext.create("Terrasoft.QueryConfig", {
      modelName: modelName,
      columns: columns
    });
    var filtersConfig = {
      property: "SysUser",
      value: currentUser
    };
    store.setPageSize(Terrasoft.AllRecords);
    store.loadPage(1, {
      isCancelable: true,
      filters: Ext.create("Terrasoft.Filter", filtersConfig),
      queryConfig: queryConfig,
      callback: function(loadedRecords, operation, success) {
        if (success) {
          alert("success :"+ loadedRecords.length);
          for (var i = 0, ln = loadedRecords.length; i < ln; i++) {
            var record = loadedRecords[i];
            alert("i "+ record);
          }
        }
      },
      scope: this
    });
        Ext.callback(callbackConfig.success, callbackConfig.scope, [true]);
    }
});

 

 

 

Like 1

Like

1 comments

Hello,

 

First, you need to check if SysUserInRole and SysUser are syncing with the mobile app (correspondent records are present in the mobile application's manifest). Then check if you get any result at the callback function when you debug the code.

Show all comments

Hi Team,

 

We have a requirement for filtering the mobile application records in the freedom UI but we doesn't have the filter icon to filter the records. 
Please help us to solve the issues.

 

Note: We are using the updated mobile application version



Like 0

Like

2 comments

Hi Team,

Please help us solve the requirement.
 

Thanks,

Prem

 

Hello,
 

Unfortunately, fast filtering options on mobile devices are currently only available in Classic UI. We realize the importance of this feature and are actively working on implementing it in Freedom UI in future application releases.


Best regards,
Malika

Show all comments

Hi, i need to customize border, margin, and etc for customizing UI for my Application on Creatio Mobile, any info about how to customize border from text box, column, or detail on mobile creatio? 
Thanks

Like 1

Like

1 comments

Hello Aleksander,

Unfortunately, there is no possibility to customize the style for now.

Our R&D team is working on adding the different themes to the UI. Please follow the release updates.

Best regards,

Anhelina!

Show all comments

Hi, 

I have some hard times trying to iterate an array of object and insert/display the values one by one on this object detail named Product in Receive

 

and here is a chunk of the code:

var splitResult = decodedText
          .split("*")
          .filter((item) => item.trim() !== "");
        var doNumber = splitResult[0];
        var prodDataObj = [];
        var slocCode = doNumber.split("/")[1];
 
        for (let i = 1; i < splitResult.length; i++) {
          var prodDataSplit = splitResult[i].split("/");
          var productName = "";
          var materialcode = prodDataSplit[1] || "";
 
          if (materialcode) {
            productName = await new Promise((resolve) => {
              Terrasoft.productByMaterialCode(materialcode, (productData) => {
                if (productData && productData.Name) {
                  resolve(productData?.Name || "");
                }
              });
            });
          }
          prodDataObj.push({
            Line: prodDataSplit[0] || 0, //line number
            MaterialCode: prodDataSplit[1] || "", //mat code
            ProductName: productName,
            Quantity: prodDataSplit[2] || 0, //quantity
            UoM: prodDataSplit[3] || "", //uom
          });
        }
prodDataObj.forEach((data) => {
          const newRecord = Ext.create("Terrasoft.BaseModel", {
            modelName: "UsrEntity_93626c0",
          });
 
          newRecord.set("UsrSKUName", data.ProductName, true);
          newRecord.set("UsrQty", data.Quantity, true);
 
          Terrasoft.getUom(data.UoM, (record) => {
            newRecord.set("UsrUoM", record, true);
          });
 
          newRecord.save({
            isCancelable: false, 
            success: function (savedRecord) {
 
              const pageController = Terrasoft.PageNavigator.getLastPageController();
              pageController.refreshDirtyData();
            },
            failure: function (error) {
              console.error("Failed to create record:", error);
            },
          });
        });

i tried to iterate using forEach but when i use newRecord.save, some weird error appears, this is one of them: 

Error in Success callbackId: TSQueryExecutorPlugin1965367711 : TypeError: Cannot read properties of undefined (reading 'rule')

 

I would greatly appreciate any assistance or guidance in resolving this issue.
Thank you.

 

Like 1

Like

1 comments

Hello,
In this situation, only the full debug of the set code can tell what exactly went wrong. Based on the code alone it is impossible to tell where is the issue in it.
The error "TypeError: Cannot read properties of undefined (reading 'rule')" doesn't tell much easier, with it we can only tell that at some point the system didn't receive a correct parameter or didn't receive anything at all, either way, a debug is still needed.

Show all comments

Hi community , 

 

I find it a little difficult to figure out how to implement the freedom ui component configuration in my page, even if Creatio documentation lists it all:

 https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/mobile-development/customization/freedom-ui/customize-page/references/common-components

The "UsrMobileUsrLeaveRequestRecordPageSettingsWorkplace2" client module is attached to this mobile page for a custom section that I designed called "UsrLeaveRequest."
How do I proceed about adding a custom button to this edit page now? 

 

[
    {
        "operation": "insert",
        "name": "settings",
        "values": {
            "entitySchemaName": "UsrLeaveRequest",
            "details": [],
            "columnSets": [],
            "localizableStrings": {
                "SocialMessageDetailCaptionUsrLeaveRequest_caption": "Feed",
                "AttachmentsDetailCaptionUsrLeaveRequest_caption": "Attachments",
                "primaryColumnSetUsrLeaveRequest_caption": "General information",
                "UsrEmployeV2_DetailStandardDetailUsrLeaveRequest_caption": "Employees detail"
            },
            "settingsType": "RecordPage",
            "operation": "insert",
 
        }
    },
    {
        "operation": "insert",
        "name": "SocialMessageDetailV2StandardDetail",
        "values": {
            "caption": "SocialMessageDetailCaptionUsrLeaveRequest_caption",
            "entitySchemaName": "SocialMessage",
            "showForVisibleModule": true,
            "filter": {
                "detailColumn": "EntityId",
                "masterColumn": "Id"
            },
            "operation": "insert"
        },
        "parentName": "settings",
        "propertyName": "details",
        "index": 0
    },
    {
        "operation": "insert",
        "name": "AttachmentsFlutterDetailStandardDetail",
        "values": {
            "caption": "AttachmentsDetailCaptionUsrLeaveRequest_caption",
            "entitySchemaName": "SysFile",
            "filter": {
                "detailColumn": "RecordId",
                "masterColumn": "Id"
            },
            "operation": "insert"
        },
        "parentName": "settings",
        "propertyName": "details",
        "index": 1
    },
    {
        "operation": "insert",
        "name": "UsrEmployeV2_DetailStandardDetail",
        "values": {
            "caption": "UsrEmployeV2_DetailStandardDetailUsrLeaveRequest_caption",
            "entitySchemaName": "Employee",
            "filter": {
                "detailColumn": "Manager",
                "masterColumn": "UsrApplicant"
            },
            "detailSchemaName": "UsrEmployeV2_Detail",
            "operation": "insert"
        },
        "parentName": "settings",
        "propertyName": "details",
        "index": 2
    },
    {
        "operation": "insert",
        "name": "primaryColumnSet",
        "values": {
            "items": [],
            "rows": 1,
            "entitySchemaName": "UsrLeaveRequest",
            "caption": "primaryColumnSetUsrLeaveRequest_caption",
            "position": 0,
            "operation": "insert"
        },
        "parentName": "settings",
        "propertyName": "columnSets",
        "index": 0
    },
    {
        "operation": "insert",
        "name": "42d4b33c-f361-44d4-92cd-07e8db664fca",
        "values": {
            "row": 0,
            "content": "Leave Request No.",
            "columnName": "UsrLeaveReaquestNo",
            "dataValueType": 1,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 0
    },
    {
        "operation": "insert",
        "name": "0d5ca981-1558-4e4d-b1a2-2b2b9dbd422c",
        "values": {
            "row": 1,
            "content": "End Date",
            "columnName": "UsrEndDate",
            "dataValueType": 8,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 1
    },
    {
        "operation": "insert",
        "name": "2013f978-c87f-4896-96be-5383cfd044e3",
        "values": {
            "row": 2,
            "content": "Start Date",
            "columnName": "UsrStartDate",
            "dataValueType": 8,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 2
    },
    {
        "operation": "insert",
        "name": "266417d3-f847-4386-af45-2674e9e779bb",
        "values": {
            "row": 3,
            "content": "Applicant",
            "columnName": "UsrApplicant",
            "dataValueType": 10,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 3
    },
    {
        "operation": "insert",
        "name": "1655829d-ce75-476c-9350-ce2696ecbf6d",
        "values": {
            "row": 5,
            "content": "Reason",
            "columnName": "UsrReason",
            "dataValueType": 1,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 4
    },
    {
        "operation": "insert",
        "name": "9f677f71-3322-4e75-9938-69ca4e1c650f",
        "values": {
            "row": 6,
            "content": "Status",
            "columnName": "UsrStatus",
            "dataValueType": 10,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 5
    },
    {
        "operation": "insert",
        "name": "3d874029-b467-4d7b-9eb0-d2ebfbe20403",
        "values": {
            "row": 7,
            "content": "Working Days Count",
            "columnName": "UsrWorkingDaysCount",
            "dataValueType": 4,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 6
    },
    {
        "operation": "insert",
        "name": "bc0d7d7e-ffdf-44a5-98b3-0a10094341e2",
        "values": {
            "row": 4,
            "content": "Applicant.Manager",
            "columnName": "UsrApplicant.Manager",
            "dataValueType": 10,
            "operation": "insert"
        },
        "parentName": "primaryColumnSet",
        "propertyName": "items",
        "index": 7
    }
]

 

Like 0

Like

2 comments

Hello,
In order to add a button to a mobile page you need to modify the viewConfigDiff element. In your code it is missing, so you should add it manually in the "settings" element:

{
&nbsp; &nbsp; "operation": "insert",
&nbsp; &nbsp; "name": "settings",
&nbsp; &nbsp; "values": {
&nbsp; &nbsp; &nbsp; &nbsp; ---
&nbsp; &nbsp; &nbsp; &nbsp; "viewConfigDiff": "[]"
&nbsp; &nbsp; }
}

Here is an example of adding a new tab to the page:

"viewConfigDiff": "[{\"operation\":\"insert\",\"name\":\"LeadDecisionsPaths_Tab\",\"parentName\":\"Lead_Tabs\",\"propertyName\":\"items\",\"values\":{\"position\":2,\"text\":\"DecisionsPaths_Caption\",\"body\":{}}}]"

The button should be added similarly. 

Jimmy Meijon,

You can find an instruction on how to add a button and its logic in this article.

Show all comments

Anyone I want to ask how to create business rules in product in order mobile apps?

 

The case is when creating new orders in mobile apps then add product in order I want to make products that appear only products in the hardware category.

 

Can anyone help me to solve this case guys?

Thank you

Like 0

Like

1 comments

Hi anyone, this case solved with this code

Terrasoft.sdk.Model.addBusinessRule("OrderProduct", {
   ruleType: Terrasoft.RuleTypes.Filtration,
   events: [Terrasoft.BusinessRuleEvents.Load],
   triggeredByColumns: ["Product"],
   filters: Ext.create("Terrasoft.Filter", {
       modelName: "Product",
       property: "Category",
       value: "Hardware"
   })
});

Show all comments