Hello 
It 's possible to add business process buton on Mobile App Freedom Ui in section , or section page.

 

Thank you 

Like 0

Like

1 comments

Hello Safa,

Unfortunately, there is no no-code way to add the custom button. We've already registered the suggestion for the R&D team.

 

Meanwhile, this article explains how to create a custom button. Please follow the release updates to find out when SDK for Mobile will be implemented.

Show all comments

Hello,

 

I'm trying to make the DELETE button on Lead to be available only for certain users. This is my code:
 

In diff:

 

In methods:


In console IsDeleteButtonVisible appears as true, but the button is hidden no matter what.

Like 0

Like

9 comments

Change events to attributes bound in row action buttons do not occur. So changing the attribute won't change the button's properties. The only way I've been able to accomplish this is to override the onRowAction with tag delete to display a message if the action is not allowed. I've also hidden that using some conditional CSS as well, but that route is a bit hacky.

Ryan

You can hide the "delete button" on the detail inheriting from Detail Schema where you need, and add some of the following pieces of code to remove New, Copy, Delete & Edit

 

If you also want to remove delete in Methods, just need to add:

 

// remove the delete option
			getDeleteRecordMenuItem: Terrasoft.emptyFn	  

 

define("NdosSchema26d0e559Detail", [], function() {
	return {
		entitySchemaName: "NdosProductosServiciosRequisionCompra",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			// Remove New record
			getAddRecordButtonVisible: function() {
				return false;
 
			},
 
			// remove the edit option           
			getEditRecordMenuItem: Terrasoft.emptyFn,
 
			// remove the copy option
			getCopyRecordMenuItem: Terrasoft.emptyFn,
 
			// remove the delete option
			getDeleteRecordMenuItem: Terrasoft.emptyFn	          
        }
	};
});

 

Regards

Julio

Julio Falcon (Cibernética),

True, as Julio says, you can hide it so it is not shown at all, but you cannot conditionally hide it. Actually, I was thinking you can't change the visible value for it at runtime (since it doesn't respond to change events). However, the current user isn't going to change, so you could use the approach of using an attribute as long as the attribute is set BEFORE the detail grid is rendered. You'd need to somehow pre-fetch that the user is in the role (like from MainHeaderSchema when they first log in), and add it to the Terrasoft.SysValues so it's retrievable without doing an ESQ, then you could set it easily in the detail's init.

Ryan

Ryan Farley,

 

Ryan, how can disable/delete the option in the same detail to select multiple records? Can help me, please?

 

Thanks

Julio

Julio.Falcon_Nodos,

Not 100% sure if this is all that is needed, so you'll have to test, but looks like it might work to add the following to disable multiselect (which means you can't delete multiple at once): 

init: function() {
	this.callParent(arguments);
	this.set("MultiSelect", false);
}

Ryan

Ryan Farley,  Julio Falcon (Cibernética),

I actually found a way to do this with your help. 
I kept the function that checks when the button should be displayed and changes the attribute value, but instead of trying to set the button through diff I called another function that sets the attribute through CSS.



 

Ryan Farley,

Thanks Ryan,

 

It didn't works :-(

 

Also what really I want to do is to know how can I detect the multiple deletion signal in a process, to recalculate the result regarding the records remaining in the detail, so If I didn't how to detect this, I found the best option is to inactivate the "Select multiple records" option in the detail menu

 

Ryan Farley,

I'm also try another approaches, but without results, to hide the "Select multiple records" menu option :-(

 

Based on article on https://community.creatio.com/questions/remove-new-and-import-buttons-lookup-object

 

define("NdosSchema82b72e2cDetail", [ "ConfigurationConstants" ], function(ConfigurationConstants) {
	return {
		entitySchemaName: "NdosDetalleDeCotizaciones",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
          init: function() {
         	this.callParent(arguments);
            this.getSectionActions();
          },
 
            getSectionActions: function() {
            	var actionMenuItems = this.callParent(arguments);
                //var itemToRemove = [];
            	actionMenuItems.each(function(item) {
            		if (item.values.Caption === "Resources.Strings.MultiModeMenuCaption" )  { //"Seleccionar varios registros" || item.values.Caption == "Select multiple records") {
            			item.values.Visible = false;
                      //item.values.Enabled = false;
                        //itemToRemove = item;
                      //itemToRemove.push(item);
 
            		}
            	});
                //actionMenuItems.remove( itemToRemove );
            	return actionMenuItems;
            }, 
 
            /* Delete the [Copy] menu item. */
            getCopyRecordMenuItem: Terrasoft.emptyFn,
 
          /* Delete the [Edit] menu item. */
            getEditRecordMenuItem: Terrasoft.emptyFn,
 
        }
	};
});

Ryan Farley,

Hi Ryan

 

Solved, the solution was shared by Pavlo Sokil and it's posted on article on https://community.creatio.com/questions/there-any-way-detect-process-wh…

Show all comments

Hello,

 

I have a custom button on Contact Section. This button allows the user to set up the Owner to multiple Contacts when selected.

 

The problem appears when I "Select all" the button turns gray and cannot be pressed. If I choose "Select multiple" and check the same records (contacts) then the button works.

 

 

In this example there are a lot of records, but I've tried the same thing with only 20 contacts that are all loaded in the page (scrolled until the last one) and it does the same. 

Like 0

Like

2 comments

We would need to see the details for the custom button to know why this behavior happens. What is the enabled property of the button bound to?

Hello Diana,

I've found an informative article according to your request for a comfortable understanding of the needed steps:
1) Please, find the added function with the same functionality as "getSectionActions"  from the article (paragraph 4).
2) Add new property to the object:
    "IsEnabledForSelectedAll": true

As a result, the code will look like:

getSectionActions: function() {
                    var actionMenuItems = this.callParent(arguments);
                    actionMenuItems.addItem(this.getButtonMenuItem({
                        "Caption": {bindTo: "Resources.Strings.MultiplyChangeAction"},
                        "Click": {bindTo: "showLoanInfo"},
                        "Enabled": {bindTo: "isCustomActionEnabled"},
                        "IsEnabledForSelectedAll": true
                    }));
                    return actionMenuItems;
                }                  
Show all comments

You need to create a custom detail generator(look at the example in Terrasoft.FileAndLinksEmbeddedDetailGenerator)

After that, create schema and add to manifest:

Ext.define("Terrasoft.configuration.CustomEmbeddedDetailGenerator", {
    extend: "Terrasoft.EmbeddedDetailGenerator",


    generateItem: function() {
        var config = this.callParent(arguments);

        var cardGenerator = this.getCardGenerator();

        var isEdit = cardGenerator.isEdit();
        if (isEdit) {
            config.xtype = "my_embeddeddetailitem";
        }
        return config;
    }

});

Create detail component with button 

Ext.define("Terrasoft.configuration.MyEditEmbeddedDetailItem", {
  extend: "Terrasoft.controls.EditEmbeddedDetailItem",
  xtype: "my_embeddeddetailitem",
  initialize: function () {
    this.myButton = Ext.create("Ext.Button", {
        text: ""
    });
    this.myButton.on("tap", this.onMyButtonTap, this);
    this.element.appendChild(this.myButton.element);
   this.callParent(arguments);
  },
  onMyButtonTap: function() {
    Terrasoft.Geolocation.getCurrentCoordinates({
        success: function(latitude, longitude, locationObj) {
        
        },
        scope: this
    });
  }
}

In RecordPageSettings metadata set generator xclass for detail
{
    "operation": "insert",
    "name": "AccountAddressDetail",
    "values": {
        "generator": {
            "xclass": "Terrasoft.configuration.CustomEmbeddedDetailGenerator"
        },
        
    },
    "parentName": "settings",
    "propertyName": "columnSets",
    "index": 3
}
 

Like 0

Like

0 comments
Show all comments

As the title says, we sometimes need to disable buttons while still showing them - something which was easy to do in Classic UI. Is there any way of doing so in Freedom UI? I can't see any examples in OOTB Freedom UI areas, anywhere that does have disabled buttons OOTB are in Classic UI sections (e.g. the "Finish session" button on the System User page on the Access Rules tab when no record is selected).

Like 1

Like

4 comments
Best reply

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Hi Harvey, 

Does it not work to bind an attribute to the enabled property of a button and set as true/false? I've not tried that, but I assume it would work? Have you already tried that?

Ryan

Classic UI buttons have a property 'enabled'
Freedom UI buttons have a property 'disabled'

Huh, not sure how I missed that, could've sworn I tried doing that! Thanks both.

As a note, the only way I could find to put some kind of hint/tooltip on the button when it's disabled is by using the "title" property, which gives you a standard browser tooltip display when hovering the mouse over the button. And binding that to an attribute that you change to be blank when the button is enabled.

Show all comments

Hi,

I have created a button in ActivitySectionV2.
This button appears on all entries in this section.

But when you click on this button, nothing happens.
Please let me know how to fix the error.

Code:

define("ActivitySectionV2", ["ProcessModuleUtilities"], function (ProcessModuleUtilities) {
  return {
    entitySchemaName: "Activity",
    details: /**SCHEMA_DETAILS*/ {} /**SCHEMA_DETAILS*/,
    diff: /**SCHEMA_DIFF*/ [{
      "operation": "insert",
      "parentName": "DataGrid",
      "propertyName": "activeRowActions",
      "name": "runProcessButtonOpenOpportunity",
      "values": {
        "className": "Terrasoft.Button",
        /*"itemType": Terrasoft.ViewItemType.BUTTON,*/
        "caption": "Відкрити угоду",
       "click": {
          bindTo: "runProcessButtonOpenOpportunity"
        },
        "style": Terrasoft.controls.ButtonEnums.style.GREEN
      }
    }] /**SCHEMA_DIFF*/,
    methods: {
      runProcessButtonOpenOpportunity: function () {
        var activeRowId = this.get("Id");
        var args = {
          sysProcessName: "UsrProcessOpenOpportunityInActivity",
          parameters: {
            OppID: activeRowId
          }
        };
        ProcessModuleUtilities.executeProcess(args);
      }
    },
    rules: {}
  };
});

Error:

Like 0

Like

1 comments

Hello,
If you want to add a button to an action menu for the active row, the regular approach will result in the error you received.
Here you can find an example of how to configure such a button properly.

Show all comments

Hi all, 

I'm migrating from Classic UI to Freedom a screen that has an Info button, as described in the following post:



https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/platform-customization/classic-ui/record-page/field/examples/attach-an-info-button

 

How can we do that in FreedomUI?

Like 0

Like

4 comments

Hi,

 

Have you tried the tooltip in the page designer at field level ?

Yes, but how can we format that text?

I'd like to add bullets in the text and breaklines

You can add add HTML to a tooltip in Freedom UI. .

If you need some dynamic content for the tooltip, you can add an attribute and bind it to the tooltip property, then set the tip at runtime by setting the attribute.

Ryan

Awesome! thanks

Show all comments

I have added a button on every record in detail for a particular column. I am trying to have one more button on the same detail, But the button is not visible on the UI.

The code that i used for this is:

{
"operation": "merge",
"name": "DataGrid",
"parentName": "DataGridContainer",
"propertyName": "items",
"values": {
"className": "Terrasoft.ControlGrid",
"controlColumnName": "UsrPlanningManagerRelevance",
"applyControlConfig": {"bindTo": "applyControlConfig"}
}
},

METHOD

applyControlConfig: function(control, activeRow) {
control.config = {
"className": "Terrasoft.Button",
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
"caption": "מסמכי רקע",//this.get("Resources.Strings.FileButtonCaption"),
"imageConfig": {"bindTo": "Resources.Images.ExportToExcelBtnImage"},
"handler": this.BackgroundDocumentsClick.bind(this, activeRow.id)
};

Can anyone help me on this?

Like 1

Like

1 comments
Best reply

Hi,



I think, you can do this by appending buttons in the targeted column.

 

var baseEle = "#Identifier div[id*=\"item-" + rowId + "\"]  div:nth-last-child(2)";
$(baseEle).append(Ext.String.format("<span></span>"));
 
var ele = baseSelector + ">span";
$(ele).click(function() {});

 

Loop collection in prepareResponseCollection method or onGridDataLoaded

Hi,



I think, you can do this by appending buttons in the targeted column.

 

var baseEle = "#Identifier div[id*=\"item-" + rowId + "\"]  div:nth-last-child(2)";
$(baseEle).append(Ext.String.format("<span></span>"));
 
var ele = baseSelector + ">span";
$(ele).click(function() {});

 

Loop collection in prepareResponseCollection method or onGridDataLoaded

Show all comments

Hi everyone,

I am looking to override the functionality of the Add Record button on the Grid Page (Section Page) of the Mobile Application. Can you help me figure out the name of the method that gets called when the Add button is tapped?

Thanks & regards,

Ramya

Like 0

Like

4 comments

Hi Ramya,

 

In order to override the functionality of the Add Record button on the Grid Page of the Mobile Application follow these steps:



1) In Configuration create a Module, for example call it UsrChangeButtonLogic:

Ext.define("InvoiceGridPage.Controller", {
    override: "Terrasoft.controller.BaseGridPage",
    statics: {
        Model: Invoice
    },
    executeAddAction: function () {
        console.log('Hello1');
        this.callParent(arguments);
           console.log('Hello2');
    }
});

2) Create a replacing view module for the MobileApplicationManifestDefaultWorkplace module. Or use a mobile wizard  - it will create the manifest automatically. Add the newly created module UsrChangeButtonLogic to the manifest:

  "Models": {
        ...
        },
        "Invoice": {
            ...
            ],
            "ModelExtensions": [],
            "PagesExtensions": [
                "MobileInvoiceRecordPageSettingsDefaultWorkplace",
                "UsrChangeButtonLogic"
            ]
        }
    },

3) Compile your Workplace and synchronize the mobile application again.

 

As a result, "Add record" button click of Invoices Grid Page will be overwritten.  

 

Artem Smyrnov,

Thank you! That worked. Can you also help me figure out how to show a confirmation dialog on the mobile application? Something similar to the web app implementation of Terrasoft.showConfirmation? Thanks in advance!



Regards,

Ramya

Ramya R,



Use Terrasoft.MessageBox.showMessage ('your confirmation dialog message') to display a confirmation dialog.



Many thanks.

Artem

 

Artem Smyrnov,

The Terrasoft.MessageBox.showMessage method only helps in displaying a message to the user. I am looking for a functionality where the user is able to select "Yes" or "No" options below the message. Can you please help me with this?

Thanks,

Ramya

Show all comments

Hi everyone,



I am trying to add a custom button to the contacts section in the mobile application. I followed the steps provided in: https://community.creatio.com/articles/adding-custom-user-action-mobile… to create a custom button on the user actions list, but I was unsuccessful.



Alternatively, is there a way to add buttons to the section (list) page, or to add a button in the Freedom UI section of the mobile application?



Regards,

Ramya

Like 0

Like

3 comments

Hi Ramya,

 

Currently there is no way to add custom buttons in Freedom UI (the article you refer to will only work in classic UI). I've created a suggestion for our R&D team to make it possible to add buttons in Freedom UI using no-code capabilities and pointed them to your community question.

 

Thank you for helping us in making the app better!

Hi Oleg Drobina,

Thank you for the prompt response. In the Classic UI, is it possible to add a button somewhere other than the record's edit page, maybe in the section page or a common menu like the settings? Or is it possible to override the existing 'Add Contact' button?



Regards,

Ramya



Oleg Drobina,

Hello, Oleg 
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-platfor…;

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
   }
]
Show all comments