Hi community,

 

I try to trigger a business process that take one argument when I click on a button. When I click on my button the pop-up (as defined in my code below) shows up but I have an error via the console in chrome dev tools.

 

Here is the error that occurs (XML parse error: not well formatted):

 

Here is my schema :

define("ContactSectionV2", ["ProcessModuleUtilities", "ContactSectionV2Resources"], function(ProcessModuleUtilities, resources) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "BtnCreateCandidat",
				"parentName": "CombinedModeActionButtonsCardLeftContainer",
				"propertyName": "items",
				"values": {
					itemType: Terrasoft.ViewItemType.BUTTON,
					style: Terrasoft.controls.ButtonEnums.style.BLUE,
					classes: {
						"textClass": ["actions-button-margin-right"],
						"wrapperClass": ["actions-button-margin-right"]
					},
					click: { bindTo: "OnClickCreateCandidat" },
					tag: "CombinedModeActionButtonsCardLeftContainer",
					caption: { bindTo: "Resources.Strings.BtnCreateCandidatCaption" },
					hint: { bindTo: "Resources.Strings.BtnCreateCandidatHint" },
					enabled: true,
				},
			},
		]/**SCHEMA_DIFF*/,
		methods: {
			OnClickCreateCandidat: function(){
				var contactId = this.getActiveRow().get("Id");
				var args = {
					parameters: {
                        ProcessSchemaContactStr: contactId
                    },
					sysProcessName: "MTF_CreateCandidatIfNotExists",
					callback: function(){
						this.showInformationDialog(contactId);
						return true;
					},
					// scope: this
				};
				ProcessModuleUtilities.executeProcess(args);
				return true;
			},
		}
	};
});

And here is my business process :

 

It takes one argument as input :

 

"parse contactId" is a simple line to transform a string to a Guid :

Guid.Parse([#ContactStr#])

and I set the value returned to the ContactId argument.

 

then I try to read a candidate with the Contact Guid that I just set (a Candidate has a lookup field to a Contact object).

 

It just check if the candidate was found, if not it will create it. The BP returns the Candidate Guid.

 

The business process runs, the Candidate object is created (empty for some reason, not even with the Contact lookup filled) each it needs but I always have the XML parse error.

 

Do you know how can I debut this and how can I resolve this ?

 

Best regards,

 

Julien G.

Like 0

Like

7 comments

Hello Julien,

 

Please find this request in the network tab of the browser and send the complete response to this request. Also what is being written in the server logs?

 

Best regards,

Oscar 

Oscar Dylan,

 

The button send a POST request.

Request (json) :

{
  "collectExecutionData": true,
  "parameterValues": [
    {
      "name": "ProcessSchemaContactStr",
      "value": "afbdee02-d829-4cd6-aef9-74c719e3d169"
    }
  ],
  "schemaName": "MTF_CreateCandidatIfNotExists",
  "resultParameterNames": []
}

and the response (json) :

{
  "processId": "a78bff89-c553-43bc-9d3a-210302be2c25",
  "processStatus": 2,
  "resultParameterValues": null,
  "executionData": null,
  "success": true,
  "errorInfo": null
}

Here is the IIS log when I click my button :

(I replaced Creatio's IP, Creatio's FQDN and my IP address)

2021-10-27 08:30:42 CreatioFQDN POST /0/ServiceModel/ProcessEngineService.svc/RunProcess - 443 julien.gunther myIPAddress Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:93.0)+Gecko/20100101+Firefox/93.0 https://CreatioFQDN/0/Nui/ViewModule.aspx 200 0 0 624

I don't have any other logs..

Julien Gunther,

 

This error somehow prevents the data from saving or something is not working in the system when you receive this error to the client-side? If not, please ignore it.

 

Best regards,

Oscar

Oscar Dylan,

This prevents the data from being saved correctly. The newly created object is saved but it is an empty object. No data is saved in the saved object.

 

Another problem is that when I click on this button, a pop-up window appears with the Guid of the selected contact (as specified in the section diagram), then it loads indefinitely. The only way to get out of this state is to reload the page.

 

Best regards,

 

Julien

Julien Gunther,

 

Issues like this are not possible to be solved in the community. Please share the backup of the app if this is deployed locally and provide steps to reproduce the problem in the email sent to support@creatio.com and I will take a look.

 

Best regards,

Oscar

Julien Gunther,



Could you go to the process library, select your business process and click the property. In the open page, check the "Trace enabled" option. 

 

After that, you can find the trace log in the business process log. From there, you can check what is the parameter value and if the value is correct or not before/after the certain step.

 

According to what you described, it sounds like the contactId parameter is not setup correctly. So it is important to ensure the contactId after your Guid.Parse is correct.

 

On the other hand, have tried to set the contactId directly from button click scripts?

 

regards,

 

Cheng Gong

Cheng Gong,

 

Sorry for my late reply,



I checked the trace, the contactId has been defined successfully. I have no trace for the formulas, only for "Create Candidate" and "Try Read Candidate".

 

Try Read Candidat trace :

{
	"Paramètres de l'élément": [
		{
			"Paramètre": "Sources de données des filtres",
			"Valeur": {
				"Avant exécution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"className\\\":\\\"Terrasoft.InFilter\\\",\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\",\\\"dataValueType\\\":10,\\\"leftExpressionCaption\\\":\\\"Candidat\\\",\\\"referenceSchemaName\\\":\\\"Contact\\\",\\\"rightExpressions\\\":[{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"displayValue\\\":\\\"ContactId\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"rightExpressions\\\":[{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\"}\"}",
				"Après exécution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"className\\\":\\\"Terrasoft.InFilter\\\",\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\",\\\"dataValueType\\\":10,\\\"leftExpressionCaption\\\":\\\"Candidat\\\",\\\"referenceSchemaName\\\":\\\"Contact\\\",\\\"rightExpressions\\\":[{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"displayValue\\\":\\\"ContactId\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"c46e04a9-f961-4607-8585-9eb58c49d628\\\":{\\\"filterType\\\":4,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"MTFContactCandidat\\\"},\\\"rightExpressions\\\":[{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{e8e60615-91be-40a0-a225-2922d2a98f23}]\\\",\\\"Id\\\":\\\"e2c00489-34d4-4d18-a703-39f3c30e7543\\\"}}}]}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"MTF_Candidat\\\"}\"}"
			}
		},
		{
			"Paramètre": "Lire d'abord",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		},
		{
			"Paramètre": "Ordre des colonnes",
			"Valeur": {
				"Avant exécution": "Name:1:1",
				"Après exécution": "Name:1:1"
			}
		},
		{
			"Paramètre": "Premier élément de la collection résultante",
			"Valeur": {
				"Avant exécution": {},
				"Après exécution": {}
			}
		},
		{
			"Paramètre": "Lire les données non validées",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		},
		{
			"Paramètre": "Considérez l'heure dans le filtre",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		}
	],
	"Paramètres du processus": [
		{
			"Paramètre": "Candidat",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "00000000-0000-0000-0000-000000000000"
			}
		},
		{
			"Paramètre": "ContactId",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		},
		{
			"Paramètre": "ContactStr",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		}
	]
}

 

Create Candidat Trace :

{
	"Paramètres de l'élément": [
		{
			"Paramètre": "Objet",
			"Valeur": {
				"Avant exécution": "106e3cde-5534-4cac-a87d-37c23359b9ef",
				"Après exécution": "106e3cde-5534-4cac-a87d-37c23359b9ef"
			}
		},
		{
			"Paramètre": "Filtres des sources de données",
			"Valeur": {
				"Avant exécution": "",
				"Après exécution": ""
			}
		},
		{
			"Paramètre": "Module d'ajout d'enregistrement",
			"Valeur": {
				"Avant exécution": "0",
				"Après exécution": "0"
			}
		},
		{
			"Paramètre": "Objet",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "00000000-0000-0000-0000-000000000000"
			}
		},
		{
			"Paramètre": "Définir la valeur des colonnes",
			"Valeur": {
				"Avant exécution": {
					"Values": {
						"b8993e82-0840-410a-82a7-386a3295755c": "00000000-0000-0000-0000-000000000000"
					},
					"FetchMetaPathes": {}
				},
				"Après exécution": {
					"Values": {
						"b8993e82-0840-410a-82a7-386a3295755c": "00000000-0000-0000-0000-000000000000"
					},
					"FetchMetaPathes": {}
				}
			}
		},
		{
			"Paramètre": "L'Id de l'enregistrement a été créé",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "3bb08bf6-abc8-4385-9b99-957c2aaa6d8c"
			}
		},
		{
			"Paramètre": "Considérez l'heure dans le filtre",
			"Valeur": {
				"Avant exécution": true,
				"Après exécution": true
			}
		}
	],
	"Paramètres du processus": [
		{
			"Paramètre": "Candidat",
			"Valeur": {
				"Avant exécution": "00000000-0000-0000-0000-000000000000",
				"Après exécution": "00000000-0000-0000-0000-000000000000"
			}
		},
		{
			"Paramètre": "ContactId",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		},
		{
			"Paramètre": "ContactStr",
			"Valeur": {
				"Avant exécution": "42a4317d-1712-41b2-994c-11b6fc64b199",
				"Après exécution": "42a4317d-1712-41b2-994c-11b6fc64b199"
			}
		}
	]
}

 

As you can see, the ContactStr parameter was successfully parsed into a Guid object.



I have no errors and, according to the trace, my Candidate object was created successfully.



When I click on the button, it gives me the contact ID in a string, that's why I had to convert it into a Guid.



Best regards,



Julien

Show all comments

Hi community,

 

I'd like to add button on a active row in a data grid :

 

For that I found posts on the community that explain how to achieve that :

https://community.creatio.com/questions/alteradd-row-buttons-newly-crea…

https://community.creatio.com/questions/add-button-row-section

https://community.creatio.com/articles/add-button-active-row-detail

https://community.creatio.com/questions/override-section-open-record-bu…

 

I tried to follow them. Here is my code :

define("ContactSectionV2", ["ProcessModuleUtilities"], function(ProcessModuleUtilities) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "BtnRowCreateCandidature",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
				"values": {
					"className": "Terrasoft.Button",
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"tag": "DataGridCandidature",
					"caption": { "bindTo": "Resources.Strings.BtnRowCreateCandidatureCaption" },
					"hint": { "bindTo": "Resources.Strings.BtnCreateCandidatureHint" },
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue){
				this.callParent(arguments);
				switch(buttonTag){
					case "DataGridCandidature":
						this.myCustomFunction(primaryColumnValue);
						break;
				}
			},
			myCustomFunction: function(primaryColumnValue){
				this.showInformationDialog(primaryColumnValue);
			},
		}
	};
});

But for some reasons, the newly created button never showed up.

Is this the right way to create a button in a datagrid row ?

 

Best regards,

 

Julien Gunther

Like 1

Like

2 comments
Best reply

Hello Julien,

 

I've used the following approach:

define("ContactSectionV2", ["ContactSectionV2Resources"], function(resources) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
        		"operation": "insert",
        		"name": "DataGridActiveRowTestButtonAdding",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
        		"values": {
                                "className": "Terrasoft.Button",
                                "style":this.Terrasoft.controls.ButtonEnums.style.BLUE,
                                "markerValue": "TestButtonAddingAction",
                                "tag": "call",
                                "caption": resources.localizableStrings.TestButtonAddingRowButtonCaption
        		}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue) {
				switch (buttonTag) {
					case "call":
						this.testClick(primaryColumnValue);
						break;
					default:
						this.callParent(arguments);
						break;
				}
			},
			testClick: function(recordId) {
				this.console.log("The button is clicked!");
			}
		}
	};
});

Using localizable resources of the schema. It seems that in your code the module doesn't load the localizable string for "BtnRowCreateCandidatureCaption" key. In my code the string value was loaded and the button is present in active row:

Best regards,

Oscar

Hello Julien,

 

I've used the following approach:

define("ContactSectionV2", ["ContactSectionV2Resources"], function(resources) {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
        		"operation": "insert",
        		"name": "DataGridActiveRowTestButtonAdding",
				"parentName": "DataGrid",
				"propertyName": "activeRowActions",
        		"values": {
                                "className": "Terrasoft.Button",
                                "style":this.Terrasoft.controls.ButtonEnums.style.BLUE,
                                "markerValue": "TestButtonAddingAction",
                                "tag": "call",
                                "caption": resources.localizableStrings.TestButtonAddingRowButtonCaption
        		}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onActiveRowAction: function(buttonTag, primaryColumnValue) {
				switch (buttonTag) {
					case "call":
						this.testClick(primaryColumnValue);
						break;
					default:
						this.callParent(arguments);
						break;
				}
			},
			testClick: function(recordId) {
				this.console.log("The button is clicked!");
			}
		}
	};
});

Using localizable resources of the schema. It seems that in your code the module doesn't load the localizable string for "BtnRowCreateCandidatureCaption" key. In my code the string value was loaded and the button is present in active row:

Best regards,

Oscar

Oscar Dylan,

 Thank you very much it works !

Show all comments

Hi Team,



I would like to apply the "enabled" property to active row buttons COPY & DELETE in  contact section.



 

I have tried the below code but it doesn't work.

{
		"operation": "merge",
		"name": "DataGridActiveRowCopyAction",
		"values": {
		//"enabled": {bindTo: "ShowButtonforAdmin"},
		"enabled": false,
		}
},
{
		"operation": "merge",
		"name": "DataGridActiveRowDeleteAction",
		"values": {
		//"enabled": {bindTo: "ShowButtonforAdmin"},
		"enabled": false,
		}
},

 

 

Kindly guide me to achieve the Enable/Disable operation in active row buttons of contact section (COPY & DELETE).



Thanks in advance!

 

 

 

Best Regards,

Bhoobalan P.

Like 0

Like

4 comments

Hi Bhoobalan, 

 

please use "visible" : false

 

instead of 

"enabled": false

and the button will be hidden.

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,



Thanks much for the response!



Yes, I have tried with visible and its working but I wanted to Disable the button for few users. The button should be displayed and disabled.





Could you please guide on achieving it?

Bhoobalan Palanivelu,

 

I'm not sure that it's possible and we don't have practical examples of such implementation using js code.

 

However, the best way to achieve it will be setting up the Object permission, it will be much easier for you and best in terms of implementation: 

 

 

Regards, 

 

Bogdan L.

 

Bogdan Lesyk,



Thanks, This OBJECT permission is OOTB and it works.

I tried to depict the button to user as disabled and to inform/give an idea as that this button is not available to click.



Thanks,

Bhoobalan P.

Show all comments

Hi, community.

 

When you click an activity on the calendar page, you get this mini page where you can complete the activity or cancel it. I need to remove the "cancel activity" button highlighted here in red:

 

I figure I can use the remove operation like in this example:


 
diff: 
/**SCHEMA_DIFF*/[ 
{ "operation": "remove", "name": "CopyButton" }, 
{ "operation": "remove", "name": "DeleteButton" }, 
{ "operation": "remove", "name": "OpenButton" } }

 

But I can't find  the schema I have to modify.... Does anyone know which one it is?

 

Thanks!

Like 1

Like

2 comments
Best reply

Hello,

 

It is ActivityMiniPage of UIv2 package. You need to re-define the insert operation of CancelButton

Regards,

Dean

Hello,

 

It is ActivityMiniPage of UIv2 package. You need to re-define the insert operation of CancelButton

Regards,

Dean

dean parrett, Thank you very much for your answer! It works as intended.

Cheers from Mexico

Show all comments

Hi,



I wanted to asks if it is possible to add new button below the help (?) button in mainHeader? This one (MainHeaderSchemaInnerRightButtonsContainerContainer) is located in the rightPanel above the communication panel.





Thanks!

Like 1

Like

2 comments
Best reply

Hi Solem,

 

You will need to extend MainHeaderSchema module and add your custom container and button inside the container there. Please study the base implementation of the MainHeaderSchema to see how the "System designer" button is added for example:

Best regards,

Oscar

Hi Solem,

 

You will need to extend MainHeaderSchema module and add your custom container and button inside the container there. Please study the base implementation of the MainHeaderSchema to see how the "System designer" button is added for example:

Best regards,

Oscar

Hi,



Thanks for checking on my question, I'm gonna try that and get back to you!.

Show all comments

Hi,

i would like to know how can i access the array of items inside this ProcessRun Button:

I've tried to use "EditPages" and "diff" from the page, but it didn't work.

Best Regards.

Thanks in advance.

 

 

Like 0

Like

1 comments

Dear Pedro, 

You can access the content of the list by getting the value of an attribute RunProcessButtonMenuItems:

 var processButtonMenuItems = this.get("RunProcessButtonMenuItems");

 

Show all comments

Hi,

On Customers listview I need to show Grid Action buttons on load of listview in separate columns (screenshot), currently buttons are showing only on click on record.

Any help will be highly appreciable

 

Regards

Like 0

Like

1 comments

Hi Muhammad,



A similar functionality was described in comments here.



Regards,

Dmytro

Show all comments

Hi,

is it possible to apply filters to the addRecord button? If so, how can i apply them and execute methods when pressing it.

This print shows the section page with the addRecord button "Novo".

Like 0

Like

1 comments

Dear Pedro,

In order to apply filters to the “addRecord” button please do the following:

1. Create a replacing client schema module. Please find more information in the article by the link below:

https://academy.creatio.com/documents/technic-sdk/7-15/creating-custom-client-module-schema

2. Set “Parent object” property to “Base data view” value https://prnt.sc/psavyp

3. Use the following code as an example:

define("BaseDataView", [], function(){

return{

                messages: {},

                mixins: {},

                methods: {                                         

                // new custom method

                TestMethod: function(){

                                return true;

                },

                // overriding addRecord method

                addRecord: function(typeColumnValue){

                var schema = this.getEditPageSchemaName(typeColumnValue);

                if(schema === "AccountPageV2"){

                                // use here your methods or filters

                                this.TestMethod();

                                }

                this.callParent(arguments);

                }

                },

                diff: /**SCHEMA_DIFF*/ [] /**SCHEMA_DIFF*/

                                };

});

 

Please find more information about filters in the article by the links below:

https://academy.creatio.com/documents/technic-sdk/7-14/entityschemaquery-class-filters-handling?_ga=2.100001118.1940880110.1572861922-1199877090.1572861922

https://academy.creatio.com/documents/technic-sdk/7-13/entityschemaquery-filters-handling?_ga=2.5228019.1940880110.1572861922-1199877090.1572861922

4. In case, if it is need to apply a filter only for particular sections, please add a name of these sections to the following part of code:

if(schema === "Section name"){

// use here your methods or filters

                this.TestMethod();

}

 

Please note that it is possible to find the name of the particular section in the query string. For example, for Account section the name is “AccountSectionV2”. Please see the screenshot below:

https://prnt.sc/psb2jp

 

Best regards,

Norton

Show all comments

When I open my page on a large screen the simple info button / user hint appears as desired/correctly:

However, when I minimize the screen or view my page on a smaller screen, the simple info buttons / user hints appear over the top of the boolean field, where as the text field info button remains the same?

How am I able to wrap the info button to the boolean fields?

Like 0

Like

1 comments

Please feel free to modify CSS according to your needs. The article by the link below explains how to add a new CSS class. If you add it to the BootstrapModulesV2 module then it will be loaded after loading the application. 

https://community.bpmonline.com/questions/how-add-custom-style-control-…

Show all comments

Hello. i'd like to hide the 'Run Process' -button in the Side Panel for certain Roles.

As well as change the contents of the drop-down of the 'Home' -button next to it.

Like 0

Like

3 comments

Dear Julius, 

In order to hide the button menu, you need to override the basic functionality, which involves development within the system.

Firstly, you need to override basic schema LeftPanelTopMenuModule. Please find the loadMenu method. There you can see that visibility of the button in based on user type. You can add your custom method to check current user rights and set the visibility based on the response result:

Here is an example of how to check current user role. In the example we are hiding the Menu button form non-administrators role. You can adjust the code up to your needs. (the example involves creating of custom CSS style and adding it to the schema dependencies):

 

As for the list of menu items, please take a look at  loadItemsMainMenu method, which is responsible for its logic.

Hope you will find it helpful.

Regards,

Anastasia

Anastasia Botezat,

 

How do you override the LeftPanelTopMenuModule module? I cannot create a replacing client module, so not sure how I would go about this. Is it no longer possible to do this?

Hi Harvey Adcock,

 

In order to replace "LeftPanelTopMenuModule" client module schema, please follow the steps described below:

 

1. Please go to Configuration > Add > Module

2. In the appeared empty module, please add the code below:

define("UsrLeftPanelTopMenuModule", ["LeftPanelTopMenuModule", "LeftPanelTopMenuModuleResources"],
 function() {
 Ext.define("Terrasoft.UsrLeftPanelTopMenuModule", {
 override: "Terrasoft.LeftPanelTopMenuModuleViewModel",
 /*
 * @override
 */
			...
 });
 }
);

Also, please add Title "UsrLeftPanelTopMenuModule" and Name "UsrLeftPanelTopMenuModule", choose the package. Important: do not set the parent object. Save the module.

 

3. Then, you need to replace "BootstrapModulesV2". Here is the article on how to replace client module schema:

 

https://academy.creatio.com/documents/technic-sdk/7-16/creating-custom-client-module-schema

 

4. In a new replacing client schema, please insert the code below:

 

define("BootstrapModulesV2", ["UsrLeftPanelTopMenuModule"], function() {
	return {};
});

Set "BootstrapModulesV2" as Title and Name, set "BootstrapModulesV2" (NUI) as a parent object, set replace parent input checked. 

 

5. Save the changes and hard-reload the page. 

Show all comments