Hi there,

 

I am trying to create a mobile app which has custom buttons which, when pressed, record a timestamp. I have created a new workplace in the mobile application wizard and have added the section where I want to include these buttons. When I generate this section, four client modules are created as shown in the image attached. Can I configure these custom buttons in one of these client modules? Some documentation recommends configuration in MobileFUI... client modules but I have no MobileFUI client modules for my new section.
 

 

Thanks 

Like 1

Like

2 comments

Hello,
The process of adding a new button in the mobile app involves creating your own remote module, basically, the list of things you need to do is following:

  1. 1) Create TypeScript project for remote module.
  2. 2) Create a custom request in remote module.
  3. 3) Create custom request handlers using remote module.
  4. 4) Register handler in remote module.
  5. 5) Build project and upload changes to Creatio.
  6. 6) Add button to the page using metadata.
  7. 7) Check functionality.
  8. Also, you need to add and enable EnableMobileSDK feature in the features section.
    An example of adding a custom module can be found in this article. In your case, the code of the remote module should look like this:
  9. import {
    	BaseRequest,
    	BaseRequestHandler,
    	CrtModule,
    	CrtRequestHandler,
    	Logger,
    	CrtRequest,
    	ModalPresenter,
    	bootstrapCrtModule,
    	DoBootstrap,
    } from '@creatio/mobile-common';
     
    @CrtRequest({
    	type: 'crt.MyButtonRequest',
    })
    export class MyButtonRequest extends BaseRequest {
    	public message?: string;
    }
     
    @CrtRequestHandler({
    	requestType: 'crt.MyButtonRequest',
    	type: 'usr.MyButtonRequest',
    	scopes: ['UsrMobileUsrUserModuleRecordPageSettingsDefaultWorkplace_Root'],
    })
    export class UsrMyButtonRequestHandler extends BaseRequestHandler<MyButtonRequest> {
    	public async handle(request: BaseRequest): Promise<unknown> {
    		var message: string | undefined = (request as MyButtonRequest).message;
    		if (message) {
    			Logger.console('Request message: ' + message);
    			ModalPresenter.showSnackBar('Message title', message);
    		}
    		return this.next?.handle(request);
    	}
    }
     
    @CrtModule({
    	requestHandlers: [
    		UsrMyButtonRequestHandler,
    	],
    })
    export class UsrModule implements DoBootstrap {
    	bootstrap(): void {
    		bootstrapCrtModule('UsrModule', UsrModule);
    	}
    }

The difference with the article above is a way to add a button. In order to do so in one of the schemas you showed (depending on where you want to locate a button) you need to add a code of the button to a viewConfigDiff:

{
	"operation": "insert",
	"name": "settings",
	"values": {
		"entitySchemaName": "UsrUserModule",
		"details": [],
		"columnSets": [],
		"localizableStrings": {
			"SocialMessageDetailCaptionUsrUserModule_caption": "Feed",
			"AttachmentsDetailCaptionUsrUserModule_caption": "Attachments",
			"primaryColumnSetUsrUserModule_caption": "General information"
		},
		"settingsType": "RecordPage",
		"operation": "insert",
        "viewConfigDiff": "[{\"operation\": \"insert\", \"name\": \"MyButton\", \"parentName\": \"UsrUserModule_PrimaryTab_Body_primaryColumnSet\", \"propertyName\":\"items\", \"values\": {\"type\":\"crt.Button\",\"caption\": \"Click here\", \"color\":\"primary\",\"clicked\":{\"request\": \"crt.MyButtonRequest\", \"params\": { \"message\": \"Some test message\" }}}}]"
	}
}

Dmytro Vovchenko,

Thank you!

Show all comments

Hello community,

 

We have an advanced dynamic folder created in a custom section. 

If a user wants to see this folder, he needs to click "Filters/Folders" >"View Folders"> and choose the dynamic folder.



Is it possible to add a custom button that will apply the dynamic folder filter when it is clicked? Basically, we want to apply the dynamic folder filter in 1 click instead of 3

Like 0

Like

4 comments
Best reply

Hello,

 

You need to call the showFolderTree method in the click event of your button:

...
{
                "operation": "insert",
                "parentName": "ActionButtonsContainer",
                "propertyName": "items",
                "name": "ShowFoldersButton",
                "values": {
                    "itemType": Terrasoft.ViewItemType.BUTTON,
                    "caption": { bindTo: "Resources.Strings.ShowFoldersButtonCaption" },
                    "click": { bindTo: "showFolderTree" },
                    "layout": {

As a result clicking on the button will simulate the same click event on the "Show folder" button.

hi Shivani Lakshman,



Yes, it is possible.



This is the table that stores the filter conditions "CustomSectionName" + "Folder". On the button click event, the dynamically created folder name has to be sent to this table and the section grid has to be loaded accordingly.



Instead of re-doing the task that has been implemented via OOTB "FilterModule", it is suggested to utilize the No-Code tools in this case, considering X number of dynamic folders. If it is for one folder, then please utilize the ESQ (for the customsectionFolder table).



In another way, a default filter can be set to a section. So when a section is loaded, it applies the filter and loads the records.





BR,

Bhoobalan Palanivelu.

Bhoobalan Palanivelu,

 

Thank you for the response. I do not want a default filter applied or add additional filters by using getFilters methos. I want the following on the UI when a button is clicked.



Is there a reference to get the below on the UI?

Hello,

 

You need to call the showFolderTree method in the click event of your button:

...
{
                "operation": "insert",
                "parentName": "ActionButtonsContainer",
                "propertyName": "items",
                "name": "ShowFoldersButton",
                "values": {
                    "itemType": Terrasoft.ViewItemType.BUTTON,
                    "caption": { bindTo: "Resources.Strings.ShowFoldersButtonCaption" },
                    "click": { bindTo: "showFolderTree" },
                    "layout": {

As a result clicking on the button will simulate the same click event on the "Show folder" button.

Oleg Drobina,

 

Thanks Oleg, You are a life saver!

Show all comments

Hello,



I am trying to set up an action for a button in my email template. I want to create a "forward this email" button that opens up an email client when the user clicks it but there doesn't seem to be a way to do this. I can see that you can set up a text hyperlink that will open up an email to specific address, but that isn't quite what I'm after.



Does anybody know a way to do this?

Like 0

Like

4 comments

Hello Evie,

What do you mean by "opens up an email client"? Do you want to create a similar button to the base one but in the template itself? 

Dmytro Vovchenko,

Hiya,



Yes, that's it – by email client I mean whatever the end user has on their desktop for opening emails. I want the button to act as a forward button as you have shown, so that when they click it it opens their emails automatically. Do you know if that can be done?



Thanks!

Evie Cobbin,

Please take a look at this conversation, I believe this is exactly what you need.

Dmytro Vovchenko,

Hiya,



Thanks for your help but I found the conversation in the link a bit confusing to be honest. I'm wondering if there is a bit of a simpler way to do it?



Thanks,

Evie

Show all comments

We are running out of space for buttons in the usual places.  We have removed the icons in the communications panel at the top of the Actions Dashboard (see this article).  Is there any way to add buttons back in?

I have tried adding a button setting 'parentName' to "CaseSectionActionsDashboardMainContainerContainer" without success.

Thanks,

Like 0

Like

3 comments

Please clarify your task: do you need to return the buttons that were removed from the Actions Dashboard or do you need to add some new buttons there? Maybe you could share some image of what it should look like?

Oscar Dylan,

We need to add some new buttons.  We have removed the facebook, telegram, message and other buttons (which are actually tabs I think) from the Actions Dashboard, is it at all possible though to put a 'Terrasoft.ViewItemType.BUTTON' in their place?

Gareth Osler,

 

It's not possible exactly in the tabs (you are right, Email, Call, Activity etc. on the actions dashobard are tabs), but there are elements like ActualDcmSchemaInformationButton button and PlaybookButton button that are inserted to the RightHeaderActionContainer element of the SectionActionsDashboard and you can use those as an example. Additionally to it, if you ran out of space on the page you can always add additional buttons to the "Actions" button (override the getActions method on the edit page schema) and call the logic needed from these buttons.

Show all comments

Dear community,

 

How do I add a new custom drop down button (like action button) in activity section?

The idea is to group functionalities under each button so as to have a clean UI.

 

Thanks in advance!

Like 0

Like

1 comments

Dear Shivani,

 

Thank you for your question!

You may visit these links below in order to achieve the result you are looking for:

1. https://academy.creatio.com/documents/technic-sdk/7-16/adding-action-ed…

2. https://community.creatio.com/questions/add-new-button-action-button-me…



Hope this helps!



Thank you and have a great day!



Regards,

 

Danyil

Show all comments

Im trying to localize a Button on a grid but it is not working out. Ive tried the following:



{

                    "operation": "insert",

                    "name": "DataGridActiveRowSomeButton",

                    "parentName": "DataGrid",

                    "propertyName": "activeRowActions",

                    "values": {

                        "className": "Terrasoft.Button",

                        "style": Terrasoft.controls.ButtonEnums.style.GREEN,

                        "tag": "someButton",

                        "caption": {"bindTo":"Resources.Strings.DetailsCaption"},

                    }

                },



Notes:

-The DetailsCaption is added in the localizable strings

-The logic works on any other button which is not within the Grid

-When binding the button it is not appearing but when setting caption to "caption":"Details" it is appearing

-Im working on version 12

Like 0

Like

2 comments
Best reply

Hello Mohammad, 

 

Please, try to set up the title for the button by using the code:

"caption": resources.localizableStrings.DetailsCaption

 

Let us know in case any additional information is required. 

 

Best regards,

Olga. 

Hello Mohammad, 

 

Please, try to set up the title for the button by using the code:

"caption": resources.localizableStrings.DetailsCaption

 

Let us know in case any additional information is required. 

 

Best regards,

Olga. 

Olga Avis,

Thank you so much. It worked perfectly

Show all comments