Hello community,

 

I'm using isDetailEnabled method in client side to remove add button in detail based on specific conditions. For users in "System Administrator" role I want to allow the add button for every detail. 

 

 JSCODE:

isDetailEnabled: function(detailName) {
    			var esq =  Ext.create("Terrasoft.EntitySchemaQuery", {
						rootSchemaName: "SysUserInRole"
				});
				esq.addColumn("SysRole");
				// add filter for current user
				esq.filters.add("UserFilter", Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "SysUser", Terrasoft.SysValue.CURRENT_USER.value
				));
				// add filter for role name, joining to SysRole (which is where the name is stored)
				esq.filters.add("RoleFilter", Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "SysRole.Id", "83a43ebc-f36b-1410-298d-001e8c82bcad" 
				));
               esq.getEntityCollection(function(result) {
                        if (result.success && result.collection.getItems().length > 0) {
                              return true;
                        }
                       return false;
               });
                return this.callParent(arguments);
}

 

Like 0

Like

1 comments

Since EntitySchemaQuery is asynchronous, it doesn't wait for the results to return before the isDetailEnabled function returns. You'll need to pre-fetch if the user is in the role (maybe in the init, or elsewhere) and save that result in an attribute or something, then just check the attribute from the isDetailEnabled function. Does that make sense?

Ryan

Show all comments

Hi there,

 

I made a button that call ProcessModuleUtilities on click. Once clicked, the callback is called and a BodyMask is shown but never hidden.

 

Here is the button :

			{
				"operation": "insert",
				"name": "GetAccountBtn",
				"parentName": "LeftContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": {
						"bindTo": "Resources.Strings.GetAccount"
					},
					"click": {
						"bindTo": "onGetAccountClick"
					},
					"visible": {
						"bindTo": "getGetAccountButtonVisible"
					},
					"enabled": {
						"bindTo": "getGetAccountButtonEnable"
					},
					"style": "blue",
					"classes": {
                        "textClass": ["actions-button-margin-right"]
                    }
				}
			},

Here is the methods :

			onGetAccountClick: function() {
				Terrasoft.showConfirmation("Effectuer une demande pour devenir l'AM de ce compte ?", function(result) { 
    				if (result === Terrasoft.MessageBoxButtons.YES.returnCode) {
        				this.processGetAbandonAccountPopupResponse("RequestGetAccount");
    				}
				}, ["yes", "no"], this);
			},
			processGetAbandonAccountPopupResponse: function (processName) {
				args = {
					sysProcessName: processName,
					parameters: {
						accountId: this.get("Id"),
						userId: Terrasoft.SysValue.CURRENT_USER.value
					},
					callback: this.callbackShowRequestMade,
					scope: this
				};
				ProcessModuleUtilities.executeProcess(args);
			},
			callbackShowRequestMade: function () {
				this.showInformationDialog("Votre demande a été effectuée.");
			},

Here is my business process :

And finally here is the result : https://vimeo.com/727290324/560dec0d61

 

I have this error in the console  :

XML Parsing Error: not well-formed Location: https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProce… Line Number 1, Column 1

 

Here is the request made by my browser :

POST https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProcess

Request body :

{
  "collectExecutionData": true,
  "parameterValues": [
    {
      "name": "accountId",
      "value": "b253a1de-10cd-452f-bd23-28ecb696b44a"
    },
    {
      "name": "userId",
      "value": "aa995be7-7611-43ea-a79d-19894080a976"
    }
  ],
  "schemaName": "RequestGetAccount",
  "resultParameterNames": []
}

Response body :

{
  "processId": "e3493a1e-0069-4164-81e1-47c7743146f0",
  "processStatus": 1,
  "resultParameterValues": null,
  "executionData": null,
  "success": true,
  "errorInfo": null
}

Do you have any idea what can I do to fix this bodyMask issue ?

 

Kind regards,

 

Julien

Like 1

Like

2 comments
Best reply

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

Ryan Farley,

Thank you Ryan, I forgot this detail.

 

Julien

Show all comments

Hi Community,

 

We are creating email templates in DEV environment. In the DEV, we are adding link to object in the template and it works perfectly on DEV. But the issue comes when we migrate the changes to higher instances, it still shows the link to DEV.

 

How we can show the link for the same application from which the email is being sent? Really appreciate any suggestions.

 

Regards,

Sourav Kumar Samal

Like 1

Like

4 comments

Hello Sourav,

 

It seems that you are typing the whole link in the string value. Perhaps it would be suitable to replace them with macros and use Website Url (system setting for example) value to populate it. 

 

If your case does not allow you to use macros - please provide more details and screenshots along with step-by-step recreation of the misbehavior and a description of the expected behavior you want to achieve.

 

I hope this reply was helpful to you.

 

Best Regards,

Dan

Denis Bidukha,

 

We are using templates from Template section. We are using the link to object in the template as shown below,

 

 

Regards,

Sourav

Sourav Kumar Samal,

 

Unfortunately, the link to the object is absolute and not website-dependent. You should either modify it manually after migration or use the macros that was mentioned above. It is planned to change this in future versions, but there are no details available yet.

 

Best Regards,

Dan

Hi, is in the R&D plan to solve this?

Show all comments

Hello,



We have a requirement where the user should be able to Copy and paste images into the "Notes" field in the "Attachments and Notes" detail which is available out of the box. Request you to respond if anyone has implemented this before or is aware of the steps. 



Thankyou.

Like 1

Like

2 comments

Hello!

 

We've checked the information with a responsible R&D team, and there is no OOB functionality as of now. 

We already have a query registered for them to consider implementing such functionality in the upcoming application versions. I will assign your case to it to increase its priority.

Kalymbet Anastasia, Where is the values of the notes saved in the DB? which object to refer and in case if i need to copy the notes into another section notes? is it possible?

Show all comments

Hello Creatio Community !

I have configured a Product, with some conditions. Printscreen below

After I click, Fill in Product Terms (printscreen below)

the Product Conditions that i specified (Disbursment fee) do not appear in the Product terms.

How can this be solved ?

 

Like 0

Like

1 comments

Hello Petrika,



We already have a corresponding case from you. 



So we will update you accordingly.



Best regards,

Bogdan

Show all comments

Hi Community,

 

In Web we are able to show confirmation dialog using this "this.showConfirmationDialog". Is there any counterpart in mobile? We need to show some confirmation dialog in "Terrasoft.BusinessRuleEvents.Save" event.

 

Thanks

Like 0

Like

1 comments

Hello Fulgen,

 

Try using Terrasoft.MessageBox.showMessage(message) to display the message.

 

Best regards,

Oscar

Show all comments

Hello Creatio Community !

I want to resctrict the file formats uploaded to creatio. For example I want to allow uploading only pdf,word, excel, jpeg files and restrict Json files.

How is this configuration done ?

Like 0

Like

2 comments
Best reply

Hello Petrika,

 

You can refer the Secure file upload academy article to achieve your needs.

 

Regards,

Sourav Kumar samal

Hello Petrika,

 

You can refer the Secure file upload academy article to achieve your needs.

 

Regards,

Sourav Kumar samal

Sourav Kumar Samal,

Thank you . It solved my issue.

Best Regards

Show all comments

Hi Community,

 

In Creatio column stacked chart, how can we show the percentage along with the count.Any idea?

Like 0

Like

1 comments

Hello Fulgen,

 

 We have already registered the idea for our R&D team to implement this functionality in further releases. I will assign your case to this project in order to increase its priority.  



Best regards,

Bogdan

Show all comments

Hi Community,

 

We are trying to execute sql in mobile using Terrasoft.Sql.DBExecutor.executeSql

But it is not working for Custom objects in only works for OOB objects. We also tried "store.loadPage" and it is only working for OOB objects. Any idea how we can use this of Custom objects in Mobile

 

Like 0

Like

3 comments

Hi Fulgen,

 

I've added a custom section to the RequiredModels array for the model where the rule is located and I was able to get the result. The code was:

Terrasoft.sdk.Model.addBusinessRule('Contact', {
    ruleType: Terrasoft.RuleTypes.Custom,
    triggeredByColumns: ['Age'],
    events: [Terrasoft.BusinessRuleEvents.ValueChanged, Terrasoft.BusinessRuleEvents.Save],
    executeFn: function(record, rule, column, customData, callbackConfig) {
		var isValid = true;
        var store = Ext.create('Terrasoft.store.BaseStore', {
			model: 'UsrCustomSection'
		});
		var queryConfig = Ext.create('Terrasoft.QueryConfig', {
			columns: ['UsrIntegerTest', 'Id'],
			modelName: 'UsrCustomSection'
		});
		store.loadPage(1, {
			queryConfig: queryConfig,
			callback: function(records, operation, success) {
				var loadedRecordTest = records[0];
				if (loadedRecordTest) {
					var integerTest = loadedRecordTest.get('UsrIntegerTest');
					if (integerTest) {
						record.set("Age", integerTest);
					}
				}
			},
			scope: this
		});
        Ext.callback(callbackConfig.success, callbackConfig.scope, [isValid]);
    }
});

So once the age for a contact is modified it get's the value from the UsrIntegerTest column of the UsrCustomSection model and it worked correctly. Try the same approach on your end.

 

Best regards,

Oscar

Oscar Dylan,

 

Hi Oscar, did you add your custom object in your mobile manifest? It is not working using "store.loadPage" do I need to add my custom object in mobile manifest?

Fulgen Ninofranco,

 

Hi,

 

Yes, I've added it as the required model for the "Contact" model in the manifest and also added it as a section to the mobile app:

"Models": {
		"Contact": {
			"RequiredModels": ["Order", "UsrCustomSection"],
			"ModelExtensions": ["UsrContactAgeRule"]
		}
	},

Best regards,

Oscar

Show all comments

how to select any contact as owner when creating a new activity, I tried to change "ShowAllContactsAsOwner" feature to true but still, I can't select only system user contacts

Like 0

Like

1 comments

Hello Moheman,

 

usually, all the users under the All employees role can be set as owners.

Please note, that custom filters can also cover up users from being added to the owner field.

You can find more information about creating activities here:

 

https://academy.creatio.com/docs/8-0/user/crm_tools/activities/create_a…

 

Regards,

Gleb.

Show all comments