Hi All,

 

How to block the display of Modal box in Manager Mood functionality available in Opportunity page?

Tried setting the enabled property to false in diff as well as tried with Business rule but with negative results. Any other approach, kindly suggest.

 

Thanks

Anupama

Like 0

Like

1 comments
Best reply

Hi Anupama,

 

You need to use this:

var element = document.getElementById("OpportunityPageV2MoodContainerContainer")
element.style.pointerEvents = "none"

and add some check into the onEntityInitialized method that will trigger the code above.

 

Best regards,

Oscar

Hi Anupama,

 

You need to use this:

var element = document.getElementById("OpportunityPageV2MoodContainerContainer")
element.style.pointerEvents = "none"

and add some check into the onEntityInitialized method that will trigger the code above.

 

Best regards,

Oscar

Show all comments

Is there any way I can access a button instance directly, e.g., in the 'click' method of a client module in order to set the colour of the button using the setStyle method of the button object?

Like 0

Like

1 comments

Not sure if it's possible since setStyle only receives some value as an argument and is being executed when the button is initialized.

 

In your case I would recommend to add this code to the click handler:

var buttonElementToModify = document.getElementById("ContactPageV2ChangeContainerStateButtonButton-textEl");
				buttonElementToModify.style.backgroundColor = "Green";

and replace ContactPageV2ChangeContainerStateButtonButton-textEl with an actual id of the element in DOM:

As a result when the button is clicked its color will be changed to green.

 

Best regards,

Oscar

Show all comments

Is it possible to add validation code to the client module of a pre-configured page (i.e. in the same way you would an edit page)?

Like 0

Like

1 comments

Hi Gareth, 

 

In this case, we are suggesting using Business processes for such implementation. 

 

https://academy.creatio.com/docs/7-17/user/bpm_tools/process_elements_r…

 

https://academy.creatio.com/docs/user/bpm_tools/dynamic_case_setup/case…

 

This element will generate the code itself and you don't need to change the Schema manually, which will be much complicated and could potentially affect the whole page.

 

Best Regards, 

 

Bogdan L.

 

 

 

Show all comments

Hi Team,

We have a business use-case like enabling the MiniPage (View Mode) in the activity section based on conditions. I have enabled the view mode of the MiniPage, now I am able to see the mini page for all the records. But I need to show it for the records based on some conditions like (Eg: Title = "Appointment").



How to achieve this kind of implementation?



Regards,

Adharsh S

Like 0

Like

5 comments
Best reply

Hi Adharsh,

 

The logic below will make a mini page in view mode not appear on the page in case the title of the activity contains the "Visit" word.

 

Create a replacing view model for the ActivitySectionV2 and add the following code there:

define("ActivitySectionV2", [],
	function() {
		return {
			entitySchemaName: "Activity",
			attributes: {
				"ResultGridSet": {
					"dataValueType": this.Terrasoft.DataValueType.TEXT,
					"type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
					"value": ""
				}
			},
			mixins: {},
			methods: {
				onGridDataLoaded: function(response){
					this.callParent(arguments);
					var subjectsToExclude = "";
					Terrasoft.each(response.collection.getItems(),function(item){
						var activityTitle = item.values.Title;
						var activityId = item.values.Id;
						if (activityTitle.indexOf("Visit")!= -1){
							subjectsToExclude = subjectsToExclude + activityId +",";
						}
					});
					subjectsToExclude = subjectsToExclude.substring(0, subjectsToExclude.length - 1);
					this.set("ResultGridSet", subjectsToExclude);
				},
				prepareMiniPageOpenParameters: function(options, entityInfo){
					var rowId = options.rowId;
					var gridSet = this.get("ResultGridSet");
					if (gridSet.indexOf(rowId)!=-1){
						return;
					}
					this.callParent(arguments);
				}
			},
			diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
		};
	}
);

The logic is simple:

 

1) onGridDataLoaded method is always called when the grid is loaded in the section. It contains the response argument which contains actual data that is stored in the grid (and we can use it).

 

2) Once onGridDataLoaded is called we take the response and check if the activity title contains the "Visit" word and perform this check for each item in the grid. If the activity title contains the "Visit" word we take an Id value for this activity and add it to the string subjectsToExclude parameter.

 

3) subjectsToExclude parameter result will be then passed to the ResultGridSet attribute that will be then used inside the prepareMiniPageOpenParameters method.

 

4) prepareMiniPageOpenParameters method is the method from base MiniPageUtilities mixin and we need to override its logic in the Activities section. prepareMiniPageOpenParameters has the options argument that is primary data regarding the activity on which the mouseover event was called. We can get the activity id from the options argument and use it further.

 

5) Inside the prepareMiniPageOpenParameters method we get the ResultGridSet attribute value and then check if the Id that was received from options can be found inside the ResultGridSet string. If it can be found the prepareMiniPageOpenParameters does nothing (and as a result the minipage is not opened), else - perform the parent method execution.

 

Feel free to create your own logic based on this example.

 

Best regards,

Oscar

Hi Adharsh,

 

The logic below will make a mini page in view mode not appear on the page in case the title of the activity contains the "Visit" word.

 

Create a replacing view model for the ActivitySectionV2 and add the following code there:

define("ActivitySectionV2", [],
	function() {
		return {
			entitySchemaName: "Activity",
			attributes: {
				"ResultGridSet": {
					"dataValueType": this.Terrasoft.DataValueType.TEXT,
					"type": this.Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
					"value": ""
				}
			},
			mixins: {},
			methods: {
				onGridDataLoaded: function(response){
					this.callParent(arguments);
					var subjectsToExclude = "";
					Terrasoft.each(response.collection.getItems(),function(item){
						var activityTitle = item.values.Title;
						var activityId = item.values.Id;
						if (activityTitle.indexOf("Visit")!= -1){
							subjectsToExclude = subjectsToExclude + activityId +",";
						}
					});
					subjectsToExclude = subjectsToExclude.substring(0, subjectsToExclude.length - 1);
					this.set("ResultGridSet", subjectsToExclude);
				},
				prepareMiniPageOpenParameters: function(options, entityInfo){
					var rowId = options.rowId;
					var gridSet = this.get("ResultGridSet");
					if (gridSet.indexOf(rowId)!=-1){
						return;
					}
					this.callParent(arguments);
				}
			},
			diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
		};
	}
);

The logic is simple:

 

1) onGridDataLoaded method is always called when the grid is loaded in the section. It contains the response argument which contains actual data that is stored in the grid (and we can use it).

 

2) Once onGridDataLoaded is called we take the response and check if the activity title contains the "Visit" word and perform this check for each item in the grid. If the activity title contains the "Visit" word we take an Id value for this activity and add it to the string subjectsToExclude parameter.

 

3) subjectsToExclude parameter result will be then passed to the ResultGridSet attribute that will be then used inside the prepareMiniPageOpenParameters method.

 

4) prepareMiniPageOpenParameters method is the method from base MiniPageUtilities mixin and we need to override its logic in the Activities section. prepareMiniPageOpenParameters has the options argument that is primary data regarding the activity on which the mouseover event was called. We can get the activity id from the options argument and use it further.

 

5) Inside the prepareMiniPageOpenParameters method we get the ResultGridSet attribute value and then check if the Id that was received from options can be found inside the ResultGridSet string. If it can be found the prepareMiniPageOpenParameters does nothing (and as a result the minipage is not opened), else - perform the parent method execution.

 

Feel free to create your own logic based on this example.

 

Best regards,

Oscar

Oscar Dylan,

Thanks for the reply.



One small change in the code,

Instead of , var rowId = options.rowId;

You can choose  var rowId = entityInfo.recordId;



Because, options.rowId returns "undefined".



Regards,

Adharsh S

Adharsh,

 

You are welcome.

 

This is strange, in my code options.rowId returned values and entityInfo was always undefined:

Maybe it behaves differently in different sections... Anyway, debugging will always provide a correct way to get the data needed:)

 

Best regards,

Oscar

Oscar Dylan,

 

It is interesting. Might be it behaves differently in different sections. But I see your screenshot, you have debugged in the ActivitySection right. I have implemented the functionality on the same schema page. It seems to be weird behaving different across instances!



Regards,

Adharsh S

Oleg Drobina,



Could you please share how did you debug the client code using IDE.

Creatio doesn't have an article for the de-bugging the JS files in realtime using IDE. If you could share the steps it would be of great help.



BR,

Bhoobalan Palanivelu.

Show all comments

Hi,

I have an "Anúncios" lookup. I want to create a new record from the lookup, but in the "Anúncios" lookup, the record is created but the relationship is not.

Can anyone explain to me why this happens?

 

Thanks!

Like 0

Like

2 comments

Hello Andreia,



Unfortunately, it can't be configured automatically. 

So, after creating a new record from the lookup you have to configure the relationship manually, 



As a workaround, you can create a new business process to achieve your business task,



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

Thanks, Bogdan.

Show all comments

When trying to initiate a new WhatsApp chat with a customer, more than 24 hours after the last message on the past chat, we get the alert: "Unable to send the message, the conversation ended more than 24 hours ago"

How can we bypass this to send an verified and approved HSM message to the customer?

Like 0

Like

3 comments

Hello Julian, 

 

The error message indicates that more than 24 hours passed after the last incoming message and prevents you from initiating the chat once again from your side, such limitation is done in order to prevent Spam messages (so your messages sent after 24 hours from last incoming message won't be delivered to a client).

However, you will be able to continue the same chat with no error message once there is a new incoming message from a client.

 

Best regards, 

Anastasiia

Anastasiia Zhuravel,

WhatsApp allows sending of pre-approved HSM messages after 24 hrs. We have seen that if we (manually) reopen the chat and send a correctly pre-approved HSM message, this is successfully sent even after 24 hrs. Is this the correct/supported method of sending approved HSM messages in Creatio, or should we send some method?

julian hatteea,

 

Hello, 

 

We have double-checked this information and so far, this functionality is not implemented in our system. We have already registered the corresponding query for our R&D team and will be waiting for implementation of pre-approved HSM messages functionality in the upcoming versions. 

 

Thank you for helping us to make our Application better. 

 

Best regards, 

Anastasiia

Show all comments

Hi All,

I have a use case to create an attachment detail using the custom object in the Pre-Config page. I have created a object having Parent Object as (File).







I have created a detail inside the preconfig Page,







But I couldn't see the detail as attachment in UI rather I could see it as an normal detail,





I have updated the parent page of the Detail schema to FileDetailV2, Even though I am unable to see the attachment changes in UI.



So, I have changed the entity schema name directly in the code as "FileDetailV2",





Now I am able to see the attachment in UI. But having error in the console. This error comes on opening of the page as well as trying to delete any attachment.



Also, In the designed it shows the detial as Unregistered as shown below.





Could anyone help where I have went wrong, how to resolve this issue and create a attachment detail with custom object ?



Regards,

Adharsh S

 

Like 0

Like

4 comments

Hello Adharsh, 



Please change SchemaName back to UsrSchema******Detail and change the Parent schema back to FileDetailV2. Then compile the system. 

IF the issue persists, please contact us at support@creatio.com

Best regards,

Yurii

Hello Yurii Sokil,

 

I have made the changes and compiled my instance. Post that I could see the detail as an attachment. But still, I could face the error in the console on the opening of the pre-configured page and deletion of records too.







Regards,

Adharsh S

Adharsh,



Please contact us at support@creatio.com 

This situation need deeper analysis than we can provide on community. 

Yurii Sokil,

I'm also facing the same error in console while implementing using the above method.

Show all comments

Hi All,

 

The use case is to remove OOTB items/buttons from the action menu in Section edit page depending on the user roles such as, (Follow the Feed, Setup Access rights etc..)



There are example codes to add a new item to the action menu, as shown below,







How to remove an existing item from the action menu. Is there a way to achieve it?



Regards,

Adharsh S

Like 0

Like

2 comments
Best reply

Hi Adharsh, 

 

In this case you can set up access rights, so only needed persons(e.g. Supervisor) will be able to see the items.

 

Please check the next post, it contains a very detailed instruction regarding how this functionality can be implemented:

 

https://community.creatio.com/articles/how-show-action-set-access-right…

 

Best Regards, 

 

Bogdan L.

Hi Adharsh, 

 

In this case you can set up access rights, so only needed persons(e.g. Supervisor) will be able to see the items.

 

Please check the next post, it contains a very detailed instruction regarding how this functionality can be implemented:

 

https://community.creatio.com/articles/how-show-action-set-access-right…

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,



I am able to hide the "Setup Access Rights" based on roles by referring the document. 







Similar to that when I tried to hide the "Follow the feed" based on roles. In the base I could find only the "Enable" property for the button. So I have overridden that method as below and it got disabled based on roles,

 

            getChangeUserSubscriptionIsEnabled: function() {

                return this.get("CanManageAccessRight");

            }



But the requirement is to hide the button based on Roles. I also tried to override this method "getEsnTabVisible" but I am still able too see the Follow the feed button in UI. 



Is there any other way to achieve this use case?



Regards,

Adharsh S

Show all comments

Hi All,



I have a use-case as the user doesn't has access to redirect to the a new page on clicking of the hyperlink of the lookup field.







How to disable the Hyper-Link for the lookup field and show it as normal text?



Regards,

Adharsh S

Like 0

Like

1 comments

Hello Adharsh,

 

You can find the answer to your question in this Community post.

 

Best regards,

Bogdan S.

Show all comments

Hi All,

How to add filter to the virtual Lookups, I had added virtual lookup for contact entityschema. And when I tried to add filter to that, its not filtering out the data.

I have attached my code for the reference,





 

After adding the filter I am able to see all the values in the Lookup.

Is there a way, to Filter the Lookup values in Virtual lookup column ?

 

Regards,

Adharsh S

Like 0

Like

7 comments

Hello Adharsh,

Something else must be going wrong. I just tested this and my filters do get applied to the virtual lookup for me. My code looks like this: 

"ContactLookup": {
	dataValueType: Terrasoft.DataValueType.LOOKUP,
	type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
	caption: "Test",
	referenceSchemaName: "Contact",
	isSimpleLookup: true,
	lookupListConfig: {
		filters: [function() {
			var filters = Ext.create("Terrasoft.FilterGroup");
			filters.add("TestFilter", Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Name", "Ryan Farley"));
			return filters;
		}]
	}
}

and the result is: 

Ryan

Hello Adrash,

 

We've also tested Ryan's code and it works. Please use the same approach on your side to complete the business task.

 

Best regards,

Oscar

Ryan Farley, Oscar Dylan,

 

I have even tried with your code also, But I still find the same result. There is no error in console too. I am not sure what is been missed.





 

The only difference I could see is that I have implemented this virtual lookup in the Detail schema page and you have done this is Edit Page of a section.

Will this make any difference it Filtering the records?  Ideally it shouldn't do such way.



Regards,

Adharsh S

Adharsh,

 

You need to debug the logic and see if the filter is returned upon:

 

var filters = Ext.create("Terrasoft.FilterGroup");
			filters.add("TestFilter", Terrasoft.createColumnFilterWithParameter(Terrasoft.ComparisonType.EQUAL, "Name", "Ryan Farley"));
			return filters;

execution. Also check if there is no other logic is connected to the same column which may affect the filter.

 

Best regards,

Oscar

This is an old thread, but I wanted to renew the conversation.  I'm having the same issue.  I've filtered lookups many times this way with no issue. 

 

I have a modal page that inherits from BaseEntityPage.  There is a virtual lookup on the page.  With isSimpleLookup = true, the lookup won't reference lookupListConfig at all.  It just ignores it.  If I change isSimpleLookup = false, it will reference lookupListConfig and fire the code for filter.  My problem is that since my module is already in a modal window, the lookup cant render as a modal also.  I must use a simple lookup.  I can filter simple lookups on other modules, but not this one.  There must be something different about how the module is being rendered.

 

Any thoughts on how to get the simple lookup to filter here, or be able to use a modal lookup on another modal page?

 

More on this.  So it looks like this is an issue inheriting from BaseEntityPage.  I changed my modal module to inherit from BasePageV2 and now it works.  Not sure if this is expected and I'm not sure what other issues I'll face using BasePageV2, as this is "base card schema".

 

Interesting. I have the same error and found your answer. How did you manage to close the modal since it's a BasePagev2?

Show all comments