Button
JS
studio
Studio_Creatio
7.18

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

When I compiling system after downloading my package, I get these errors. I cant fix it in any way. Where do I need to look for the trouble? In some database table or what should I look for in objects?



In all code schemas it's trying to get contact name. (The file contains screenshot with AccountSchema.Base.cs err code)

Like 0

Like

4 comments

Hello,

 

We advise registering a Case for our technical support team describing all the needed details, as there's a need to conduct a deeper investigation of the problem in order to resolve it.

 

Kind regards,

Mira

Mira Dmitruk, ok, I'll  write to them. If someone knows answer, please :)

Hi James, Did you manage to solve the problem?

 

Federica,

Hi, yep. I had this trouble two times.

 

I have an assembly package, so for the second time I didn't use replacement schemas of basic objects. I had to delete "Contact", it helps.



The first time I checked the data with SQL (table "SysEntitySchemaReferences") found and deleted broken object "Activity".

 

I think it's much easier to check source code. It says what object it's trying to find.

I hope I could help.

Show all comments
tab
accessrights
Studio_Creatio
8.0

Hi,

 

Is it possible to modify the access rights of a particular tab(Let's call it "TestTab") to be available for reading/writing only for users with a certain role?



Thank you,

Madalin

Like 0

Like

1 comments

Hello Madalin,

Your business task could be achieved only by Object operation permissions.

 

I hope the above is useful to you.

Show all comments
contact_filter
lookup
recordpermission
Studio_Creatio
7.18

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
#creatio
#8.0.3
Filters
List View
Studio_Creatio
8.0

I have problem about filter. How add filter in list creatio?

So that you understand what I mean, I've included the picture below

and the filter I mean is like this

Like 0

Like

1 comments

Hello Muhamad,

 

Your business task could be achieved by development tools.



Please refer to this article.



Best regards,

Bogdan

Show all comments
change_log
Studio_Creatio
8.0

Hi! 

I saw that in Creatio, I'm able to see the change log only for the things that we've created, but I can't see the changes made by anyone in the tabs that are out of the box like the [Feed], [Attachments and notes]. I want to mention that I'm admin and still nothing into the change log about these tabs. 

What should I do?

 

Thank you!

Like 0

Like

3 comments

Hello,



You could set up a change log to see who created, modified, and deleted feed messages for a general list (the object of the feed message is called SocialMessage) and the same for [Attachments and notes] tab.

Please see the link below: 

Set up the change log

 

We registered this idea in order to select the necessary object to log the website.

Kalymbet Anastasia,

Is it possible that we can display the change logs as a detail of a page?



Joseph Francisco,


Hello,

I have the same requirement, have you found the object where the logs are stored in?

Thank you

Show all comments
Studio_Creatio
8.0

Hi team,

 

I am trying to create dynamic folder programmatically (from client side code), 

Below is the code I tried where I am able to create record in ObjectFolder table but the folder is not visible on the frontend (UI), the reason what I think could be that I am using direct Insert.

 

When the above solution doesn't worked for me I tried calling "saveLookupFolder" method inside FolderManagerViewModel. Below is the code for it.

Following is the "saveLookupFolder" method inside FolderManagerViewModel.

 

It's giving me this error : 

In my usecase I have to create a record inside ObjectFolder table with two parameters which are "SearchData" (folder filter Value) and "Name" (folderName). But I don't know If I am using the right base function (saveLookupFolder) for this purpose, but I also think that direct insert will provide no help to me.

Someone please help in this case. What base function to call and how to call?

 

Like 0

Like

0 comments
Show all comments
EntityDataService.svc
Studio_Creatio
7.18

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
Feed
tab
Access Rights
Object Permissions
FeedComments
Sections
detail
Studio_Creatio
8.0

Hi! 

I have a question about the feed tab. 

I do want to ask you if there's any out of the box possibility to change the permissions for a user. I don't want to let a user to edit or delete his own comment posted in the feed tab, but the manager should have access to those 2 functionalities.

Can I implement this without code?

 

Thank you,

Like 0

Like

1 comments

Hello,

 

If you want to configure the deletion permissions please use Permission to delete messages and comments:image.png



Permission to delete messages and comments gives permission to delete messages and comments left by other users in the [Feed] section, on the [Feed] tab of the Notification Panel, and on the [Feed] tab of the view and edit pages of the system sections.

Please note, that there is no possibility to deny permission to users to delete their own messages and comments even if they do not have access permissions to this system operation.

Show all comments

Hi Team,

 

There is a requirement in which I have to verify a specific condition based on fields and lookup values on clicking the SAVE button. I am using ESQ in edit page schema while overriding asyncValidate method to achieve this. 

 

But, I am unable to figure out which commands can be used to get further field values of that lookup, and then compare it. For reference, here in my case, Contact lookup is on Custom section and I want to fetch Department value of it .

 

Thanks in Advance, Prashant Jha

Like 0

Like

4 comments

Hello, 

 

Please check the below Community post for an example of the implementation:

https://community.creatio.com/questions/actually-i-have-developed-code-…

 

Let us know in case of any questions. 

Best regards,

Anastasiia

Hi Anastasiia,

 

How can we fetch columns of other object through ESQ by matching them with a condition. Any example or syntax will be helpful.

Prashant Jha,

Hi, take a look at this article, I believe this is what you needed.

In any case, you can use another ESQ request based on the values you got from the previous one.

Hi, I am overriding asyncValidate method with multiple filters (A AND C) AND (B AND C). Here C is the field from the same object, A and B are the fields from other object using ESQ.

 

I have created a separate function to achieve this as below :

 

ConditionCheck : function(ID, BUnit, esq)

            {

                

            var esqFirstFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Id",ID);

            var esqSecondFilter = esq.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL,"Department.Name",BUnit);

            

             esq.filters.logicalOperation = Terrasoft.LogicalOperatorType.AND;

            

            

                     esq.filters.add("esqFirstFilter",esqFirstFilter);

                     esq.filters.add("esqSecondFilter",esqSecondFilter);

                

                esq.getEntity(function(result)

                              {

                    if(!result.success)

                        {

                            this.showInformationDialog("Error");

                            return false;

                        }

                    return true;

                },this);

            },

 

And, I have used this function to call (A AND C) and (B AND C) separately as:

 

var result1 = this.ConditionCheck (A, C, esq);

var result2 = this.ConditionCheck (B, C, esq);

 

Now, I am not sure how we can combine the result1 and result2 in asyncValidate method such that it will only going to save when both result1 and result2 holds "true". Please help me on this.

Show all comments