How can we show the Delete Menu Item for a custom detail only for a certain role like System Administrator?

 

Like 0

Like

2 comments

Hello, 

you can restrict deletion rights with object permissions.



The following instructions can help you to achieve the result you are looking for: Object operation permissions

Thank you Kalymbet!

With this option, the Delete Item would still be "visible" to all users (although only certain roles will have permission to perform deletion as defined in object permissions).

Any way to display the option only for specific roles?

Show all comments

Hello,



I would like create multiple buttons that call a business process. Due to the number of buttons in my page, I would like to create a single button click method. This method would receive a parameter that would tell it which button was called. The parameter would then determine which field would be read.



My button method should look something like this:

 onButtonClick: function(clickedButton){
				var recordId = this.get("Id");
                var readField = "Error"; //This value should change later, will show error otherwise
 
                switch(clickedButton){
                    case "Button1":
                        readField = this.get("Field1");
                        break;
                    case "Button2":
                        readField = this.get("Field2");
                        break;
                    /*More Cases
                    .
                    .
                    .
                    */
                   default:
                    console.log(readField);
                    break;
                }
 
                var config = {
                    sysProcessName: "UsrBpToCall",
                	parameters: {
						CurrentRecordId: recordId,
						ReadField: readField,
 
					}
				};
                ProcessModuleUtilities.executeProcess(config);
}

I assume the parameter would appear in the diff section, but I do not know how to implement this functionality.



I appreciate your help!

 

Kind Regards,

Firas



 

Like 1

Like

3 comments
Best reply

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Ryan Farley,



the solution works perfectly. Thank you.



I have a follow-up question if you do not mind. Does the tag being passed as the fourth argument mean that button click methods can take up to 4 arguments?  If that is the case how can one proceed if they were to pass more than one argument and populate p1 through p3? 



Thank you again, your Community responses and articles have been very helpful.



Firas

Hello,

 

Not sure about passing 4 arguments to the click event, I've been using the tag property only to pass the parameter needed. In your case you can bind the click-handler method to several buttons and specify different tags for it so the click-handler method could understand what to do according to the button tag.

Show all comments

Hi Community!

 

I have the following requirement:

We need to link a custom entity called reclamations to the activity. This has to be done m:n. So I have created a new link entity called ReclamationInActivity and added it as a detail to the ActivityPageV2.js.

 

When adding such a ReclamationInActivity record from the activity a new page opens and the user can open the reclamation lookup window there to select or create a reclamation.

When they choose to create a new reclamation, the account and contact have to be prefilled on the "new reclamation" page.

 

I cannot use business rules, because there is no link from the reclamation to ReclamationInActivity.

Also, using a business process is not an option, because the user would have to save the record first and we need to prefill the values.

Is there a way to achieve this by javascript somehow?

 

Thanks,

Robert

Like 0

Like

1 comments

Hi,

If I understand you correctly you want to add a value to columns "Contact" and "Account" from your activity. If so, you can use a simple esq request to get these values and set them in the init or onEntityInitialized methods.

Show all comments

Hello,

 

We have a boolean column in accounts section. If the value is checked, we would like to add an image on the header space as highlighted in yellow in image below. Is there a sample code/ recommendation for this?

 

Like 0

Like

1 comments

Hello,

You can write a simple button and display it in the center. 

{
				"operation": "insert",
				"name": "TestContainer",
				"parentName": "ActionButtonsContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTAINER,
					"wrapClass": ["test-container-wrapClass"],
					"items": []
				}
			},
            {
                "operation": "insert",
                "parentName": "TestContainer",
                "propertyName": "items",
                "name": "PrimaryContactButton",
                "values": {
 
                    "itemType": Terrasoft.ViewItemType.BUTTON,
                    "click": {bindTo: "testclick"},
					"visible": {bindTo: "checkVisible"},
                    "enabled": true,
                    "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
					"imageConfig": {"bindTo": "Resources.Images.EnrichedDefaultIcon"}
                }
            }

In the method checkVisible you can return true or false based on the condition.

To make it at the center just add a new CSS style:

define("AccountPageV2", ["css!UsrDStyle"], function() {

 

.test-container-wrapClass {

        margin-left: auto;

    margin-right: auto;

    width: 6em

    }

 

Show all comments

Hi Community,

 

We have enabled record permission for an object and based on some conditions we are adding role wise permissions to the record. We want to filter a contact lookup field based on the roles to whom the record has access, i.e. only those contact will show whose associated user falls under the roles to which the particular record has access.

 

Any suggestions or lead will help a lot.

 

Thanks,

Sourav Kumar Samal

Like 0

Like

2 comments

Hello,

 

To read more information about the permission access and role please refer to these Academy articles: Object operation permissionsFunctional rolesRecord permissions

Kalymbet Anastasia,

 

Thanks for the suggestions.

 

But we are looking to filter a contact lookup based on the roles to which the particular record has access. If there are any suggestion specific to this business task, that will be great.

 

Regards,

Sourav

Show all comments

Hello,

 

Bernhardt is an onsite customer.

Landing done on their web site is on Word Press and the WordPress bpmonline connector is installed.

As you can see below, there is an error with a timeout.

We have increased the timeout of the connector to 30s, we have reset IIS and Firewall has been checked.

 

On creation site, how we can check if the request arrive to Creatio and if the issue is on Creatio side ?

 

Below the log error message :

    [safe_message] => error object

    [object] => WP_Error Object

        (

            [errors] => Array

                (

                    [http_request_failed] => Array

                        (

                            [0] => cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received

 

 

Your help is needed.

Stephane Banon

ProcessFirst

 

Like 0

Like

2 comments

Hi Stephane,

 

 

You can check if the request arrived in the Creatio IIS logs. You can learn more here: https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-…



Also, I recommend testing this add-on on a cloud trial instance in order to make sure that the issue lies within the network settings.

Thank you Yevhen for your feedback.

 

Show all comments

Hi Community,

 

In Portal Case Section, how we can display the "Show closed cases" tick box?

Like 0

Like

0 comments
Show all comments

Hi,

 

In system users section page how can we filter portal users? Right now if you use Type, it is a text field there is no selection whether it is a company employee or a portal user. 

 

Like 0

Like

1 comments

Hi Fulgen,

 

You can filter the Portal users by "Connection type" column. It is an integer field, you can use the value "0" for Portal users and "1" for Company employee.

 

Regards,

Sourav

Show all comments

Hi Community,

 

How to archive the records in change log?

Like 1

Like

2 comments

Hello Fulgen, 

 

Currently, there is no functionality to archive records in the change log. We created an idea for our development team to implement it in further releases. 

Hi,

 

What does "Clear log" means, does it totally deletes the record from DB or is there any backup of this?

Show all comments

I have created a new section in Creatio 7.18, how can I access it via EntityDataService.svc? If so, is there anything specific that needs to be done when creating a new partition? I was advised to compile. I ran "Recompile All" but it still doesn't show up in EntityDataService.svc.

I can only access the objects that were there by default.

Like 0

Like

1 comments

EntityDataService.svc implements the OData 3 API. However, if your object exists in a package that compiles to it's own assembly (an assembly package - meaning your package containing your object has the "Compile package into it's own assembly" checked), it is not accessible via OData 3 and instead you must use OData 4 (not EntityDataService.svc). 

See info on using OData 4 here: https://academy.creatio.com/docs/developer/integrations_and_api/data_se…

The details about OData 3 (which uses EntityDataService.svc) not being able to access objects from Assembly Packages here: https://academy.creatio.com/docs/7-18/developer/development_tools/packa…

Object access is not supported via the OData protocol version 3. Use the OData protocol version 4 to access objects in an assembly package

Ryan

Show all comments