Hello Community,

 

I have requirement that to provide access of a particular custom lookup to a organizational role who can add, edit, and delete items in the lookup. 

 

Regards,

Jagan

Like 0

Like

2 comments

Hello,

 

Unfortunately, it is not possible to grant permissions to selected users/roles to access particular lookups. At the moment, it is possible to manage permissions only for all users/roles at once.

Bogdan,

I have been able to achieve this with a business process.

Show all comments

I have an error, when i save the formula, the validator won't let me save the changes. An error is written: "Formula value error: Parameter "NumberStyles" not found". I have added the necessary System.Globalization using for compilation.

How can I solve the validation problem without changing the business process code?

 

Like 0

Like

4 comments
Best reply

The problem has solved by disabling 'UseProcessFormulaServerValidation' feature

Hello!



Could you please provide us with connected namespace details to the process?

Alona Dolya,

 Hi! I'm using two namespaces System.Globalization and Terrasoft.Configuration.Disbursement, which has only three public classes and doesn't include name "NumberStyles".

I have observed the same problem on Demo site. System.Globalization had been added into namespaces of the process

The problem has solved by disabling 'UseProcessFormulaServerValidation' feature

Show all comments

Hi all,

 

I was following this documenation  and this video for setting up the oauth integration.

 

While doing changes in the appsettings.json, and testing it. I got an error "It was not possible to connect to the redis server(s). UnableToConnect on tscore-dev-30:6379/Interactive, Initializing". In that file, "RedisConnection": "tscore-dev-30" is already set by default.

 

I also tried to update it with the redis connectionstring which was used in the main application but it is giving me an error while setting up the default response in creatio.

 

Please help in this regard.

Like 0

Like

1 comments

Hello,



Since we have received a case from you: SR-01225980, the answer will be provided there. 

Show all comments
Question

Help with Sandbox, you need the button to be Enabled = false if it's a woman. How to make it so that the code is written correctly and the attribute in ContactPageV2 works



 

define("ContactSectionV2", [], function() {
	return {
		entitySchemaName: "Contact",
		messages: {
			"MessageOnPageClick": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			},
			"MessageIsButtonEnabledSubscribe": {
				mode: Terrasoft.MessageMode.BROADCAST,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			},
		attributes: {
			"ButtonEnabled11": {
				"dataValueType": Terrasoft.DataValueType.BOOLEAN,
				"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
				dependencies: [
					{
						columns: ["ButtonEnabled"],
						methodName: "getButtonEnabled"
					}
				]
			}
		},
		},
		methods: {
			onEntityInitialized: function() {
				this.callParent(arguments);
				this.getButtonEnabled();
			},
			onSectionClick: function() {
				this.sandbox.publish("MessageOnPageClick", null, ["SectionModuleV2_ContactSectionV2"]);
			},
			getButtonEnabled: function() {
				this.set("ButtonEnabled11", this.sandbox.publish("MessageIsButtonEnabledSubscribe", null, ["SectionModuleV2_ContactSectionV2"]));
			},
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"parentName": "CombinedModeActionButtonsCardLeftContainer",
				"propertyName": "items",
				"name": "NewButton",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
                    "caption": {bindTo: "Resources.Strings.NewButtonCaption"},
                    "classes": {"textClass": "actions-button-margin-right"},
					"click": {bindTo: "onSectionClick"},
					"style": Terrasoft.controls.ButtonEnums.style.RED,
					"enabled": {bindTo: "ButtonEnabled11"}
				}
			}
		]/**SCHEMA_DIFF*/
	};
});
 
define("ContactPageV2", [], function() {
	return {
		entitySchemaName: "Contact",
		attributes: {
			"ButtonEnabled": {
				"dataValueType": Terrasoft.DataValueType.BOOLEAN,
				"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
				dependencies: [
					{
						columns: ["Gender"],
						methodName: "setButtonEnabled"
					}
				]
			}
		},
		messages: {
			"MessageOnPageClick": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			},
			"MessageIsButtonEnabledSubscribe": {
				mode: Terrasoft.MessageMode.BROADCAST,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			},
		},
		methods: {
			onEntityInitialized: function() {
				this.callParent(arguments);
				this.setButtonEnabled();
				this.sandbox.subscribe("MessageOnPageClick", function() {
					return this.onPageClick();
				}, this, ["SectionModuleV2_ContactSectionV2"]);
			},
			onPageClick: function() {
				this.showInformationDialog(";;;;;;");
			},
			setButtonEnabled: function() {
				var value;
				if (this.get("Gender") != null && this.get("Gender").value == "eeac42ee-65b6-df11-831a-001d60e938c6")  {
					value = true;
					this.set("ButtonEnabled", value);
					this.sandbox.subscribe("MessageIsButtonEnabledSubscribe", value, ["Answer"]);
				}
				else {
                    value = false;
					this.set("ButtonEnabled", value);
					this.sandbox.subscribe("MessageIsButtonEnabledSubscribe", value, ["Answer"]);
				}
			},		
		},
		diff: [{
			"operation": "insert",
			"parentName": "LeftContainer",
			"propertyName": "items",
			"name": "NewButton",
			"values": {
				"itemType": Terrasoft.ViewItemType.BUTTON,
				"caption": { bindTo: "Resources.Strings.CaptionButton" },
				"classes": { "textClass": "actions-button-margin-right" },
				"style": Terrasoft.controls.ButtonEnums.style.BLUE,
				"enabled": {bindTo: "ButtonEnabled"},
				"click": {bindTo: "ButtonEnabled"}
			}
		}] /**SCHEMA_DIFF*/
	};
});

 

Like 0

Like

1 comments

Hi Erlan,

 

Please clarify what exactly in the approach discussed here yesterday doesn't work. Why do you still need sandbox messages in this scenario?

Show all comments

Hi,

 

I would like to add custom buttons to a lookup that opens when clicking on an Action Item in the account section. Autogenerated Page will not meet our requirement as the client just wants a pop-up and do not want to open a whole separate page. I couldn't find a way to add the buttons specific to 1 lookup, hence I created a custom ModalBox as below:

This has 1 field which is a filtered Contact lookup.

On clicking the lens icon, the lookup opens, but the issue is that it lies on top of the existing ModalBox as below:

How can I open it in a separate window and pass the selection to the custom ModalBox?

Any help is appreciated. Thanks!

Like 0

Like

1 comments

Hello,

Thanks for reaching out!

 

I'd suggest checking out a similar post on our Community where you'll find detailed steps on how to set up the functionality you're looking for. It's quite informative and might have just what you need.

 

I hope you'll find the answers to your questions there.

 

Best regards, Pavlo!

Show all comments

Hello Creatio Community,

I'm working on a section featuring two fields: a numeric "Project Number" field and a lookup "Parent Project Number" field. I need to set up a safeguard that prevents users from choosing the same value in both fields. Seeking advice on how to implement this effectively within Creatio's environment.

Appreciate your insights

Like 0

Like

1 comments

Hello,

one of the ways to implement this would be using validation, though you would only see that fields are same during save process. to implement this you'd be replacing code for client schema page where you need this check - specifically code for method asyncValidate - its a method describing validity of page before saving. Examples of using it can be found on community, for example here https://community.creatio.com/questions/use-asyncvalidate-minipage

in method you'd descibe interaction you need - if check thats comparing values of 2 fields (need to take actual value of lookup field to compare it to numeric) and if they match throw 

validationResult.success = false;
and message descibing unsuccessfull validation in validationResult.message
then the save wouldnt happen and user would get a message that you specify
Show all comments

Condition:

The button should be available if the current contact is male (corresponding value for the corresponding field on the contact page). The availability of the button takes into account the change of the field.

Implement button state tracking by binding the "enabled" property of the button to an attribute ("attributes" property) of a Boolean type.

The button should work in combined (combined) mode. This mode is enabled when you open any entry in the section in the current browser tab. In fact, the entry opens on the client schema of the section (in the address bar of the browser, you can see that the client schema is now the Section of the section). To open an entry in client-side page schema mode (the address bar will have a Section Page), either open the section entry in a new browser tab, or open the section entry in the current browser tab and refresh the page.

To implement the data exchange to track the state of the button, you need to use Sandbox.

 

I have a problem, I don't know how to track attribute state in ContactSectionV2 from ContactPageV2 using SandBox? I am unable to control access in ContactSectionV2.

 

define("ContactPageV2", [], function() {
	return {
		entitySchemaName: "Contact",
		attributes: {
			"ButtonEnabled": {
				"dataValueType": Terrasoft.DataValueType.BOOLEAN,
				"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
			}
		},
		messages: {
			"MessageOnPageClick": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			},
			"MessageIsButtonEnabled": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			}
		},
		methods: {
			onEntityInitialized: function() {
				this.callParent(arguments);
				this.setButtonEnabled();
				this.sandbox.subscribe("MessageOnPageClick", function() {
					return this.onPageClick();
				}, this, ["SectionModuleV2_ContactSectionV2"]);
				this.sandbox.subscribe("MessageIsButtonEnabled", function() {
					alert(osfeofksepofkpo);
					return this.setButtonEnabled();
				}, this, ["SectionModuleV2_ContactSectionV2"]);
			},
			onSaved: function() {
				this.callParent(arguments);
				this.setButtonEnabled();
			},
			onPageClick: function() {
				this.showInformationDialog(";;;;;;");
			},
			setButtonEnabled: function() {
				var buttonEnabledValue = this.get("ButtonEnabled");
				if (this.get("Gender") != null && this.get("Gender").value == "eeac42ee-65b6-df11-831a-001d60e938c6") {
					this.set("ButtonEnabled", true);
					this.sandbox.subscribe("MessageIsButtonEnabled", function() {
						alert(true);
						return this.set("ButtonEnabled", true);
					}, this, ["SectionModuleV2_ContactSectionV2"]);
				}
				else {
                    this.set("ButtonEnabled", false);
					this.sandbox.subscribe("MessageIsButtonEnabled", function() {
						alert(false);
						return this.set("ButtonEnabled", false);
					}, this, ["SectionModuleV2_ContactSectionV2"]);
				}
			}
 
		},
		diff: [{
			"operation": "insert",
			"parentName": "LeftContainer",
			"propertyName": "items",
			"name": "NewButton",
			"values": {
				"itemType": Terrasoft.ViewItemType.BUTTON,
				"caption": { bindTo: "Resources.Strings.CaptionButton" },
				"classes": { "textClass": "actions-button-margin-right" },
				"style": Terrasoft.controls.ButtonEnums.style.BLUE,
				"enabled": {bindTo: "ButtonEnabled"},
				"click": {bindTo: "onPageClick"}
			}
		}] /**SCHEMA_DIFF*/
	};
});
 
define("ContactSectionV2", [], function() {
	return {
		entitySchemaName: "Contact",
		messages: {
			"MessageOnPageClick": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			},
						"MessageIsButtonEnabled": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			}
		},
		methods: {
			onCardRendered: function() {
				this.callParent(arguments);
				this.onSectionButtonEnabled();
			},
			onSectionClick: function() {
				this.sandbox.publish("MessageOnPageClick", null, [this.sandbox.id]);
			},
			onSectionButtonEnabled: function(message) {
				this.sandbox.publish("MessageIsButtonEnabled", null, [this.sandbox.id]);
			}
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"parentName": "CombinedModeActionButtonsCardLeftContainer",
				"propertyName": "items",
				"name": "NewButton",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
                    "caption": {bindTo: "Resources.Strings.NewButtonCaption"},
                    "classes": {"textClass": "actions-button-margin-right"},
					"click": {bindTo: "onSectionClick"},
					"style": Terrasoft.controls.ButtonEnums.style.RED,
					"enabled": {bundTo: "ButtonEnabled"}
				}
			}
		]/**SCHEMA_DIFF*/
	};
});

 

Like 0

Like

4 comments
Best reply

Erlan Ibraev,

 

It will do the needed action, I've tested this code before providing it. The code is added to be used in the combined mode which means that when you open the contact page from the section then the logic from the ContactSectionV2 will be triggered (your initial question).

Should be blocked for women this button

To achieve the result:

 

1) Display the "Gender" column in the section list

2) Replace the code in the ContactSectionV2 with the code attached:

define("ContactSectionV2", [], function() {
	return {
		entitySchemaName: "Contact",
		messages: {},
		attributes: {
			"ButtonEnabled": {
                "dataValueType": Terrasoft.DataValueType.BOOLEAN,
                "type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
                "value": true
            }
		},
		methods: {
			onCardRendered: function() {
				this.callParent(arguments);
				var gridData = this.get("GridData");
                var activeRow = this.get("ActiveRow");
				if (gridData) {
					if (activeRow) {
						var activeRowData = gridData.get(activeRow);
						var activeRowDataGender = activeRowData.get("Gender");
						if (activeRowDataGender) {
							var enableButton = activeRowDataGender.displayValue !== "Female";
							this.set("ButtonEnabled", enableButton);
						} else {
							this.set("ButtonEnabled", false);
						}
					} 
				}
			},
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"parentName": "CombinedModeActionButtonsCardLeftContainer",
				"propertyName": "items",
				"name": "NewButton",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
                    "caption": {bindTo: "Resources.Strings.NewButtonCaption"},
                    "classes": {"textClass": "actions-button-margin-right"},
					"click": {bindTo: "onSectionClick"},
					"style": Terrasoft.controls.ButtonEnums.style.RED,
					"enabled": {bindTo: "ButtonEnabled"}
				}
			}
		]/**SCHEMA_DIFF*/
	};
});

This will make the button to be enabled only in case gender of the current contact is "Male" and will be disabled in case gender of the current contact is "Female" or empty.

Олег Дробина,

 

But I need Enabled to depend on an attribute which is in ContactPageV2

Erlan Ibraev,

 

It will do the needed action, I've tested this code before providing it. The code is added to be used in the combined mode which means that when you open the contact page from the section then the logic from the ContactSectionV2 will be triggered (your initial question).

Show all comments

Hi Community,

 

We have this functionality that we are subscribing to message on load of record page. How we can unsubscribe once we close/cancel/discard the record page.



Below is the code how we subscribe during record on load.



    init: function() {

                this.callParent(arguments);

                this.subscriptionFunction();

                

            },

            

            subscriptionFunction: function() {

                Terrasoft.ServerChannel.on(Terrasoft.EventName.ON_MESSAGE,

                this.onMyProcessMessage, this);

            },

Like 0

Like

2 comments

To unsubscribe from the message when the page is closed/canceled/etc, add the following: 

destroy: function() {
    Terrasoft.ServerChannel.un(Terrasoft.EventName.ON_MESSAGE, this.onMyProcessMessage, this);
    this.callParent(arguments);
}

Ryan

Ryan Farley,

Thank you Ryan.

Show all comments

When open edit card, functional(visual and js) doesn't working and in console next error's:



 file: https://dogarray.com/core/hash/ng-core/src/polyfills-es5.js?hash=41f4be…

 line: 1

 column: 16702

 message: Uncaught Terrasoft.ItemNotFoundException: Property Ext is not defined in class Terrasoft.model.BaseViewModel 




*Helping out re-create edit page, but I don't like this way

Like 0

Like

1 comments

Hello,



Could you please specify how did you create this section\edit page?

 

Show all comments
Question

Hello, im trying to migrate a package to a new project, but i cant upload my files since the configuration is not available and I have not found a way to activate it.



I had tried to use the tutorial in creatio academy but is still confuse for me. 



Like 0

Like

1 comments