Hi Community,

 

We need to override destroy function in edit page and put our custom logic. However, we noticed if you are clicking add button on details on edit page, destroy function is not being called. The destroy function is only being executed when you are clicking close/cancel or if you are clicking directly to other menu. What is the counter part of destroy function when user is  clicking add button on details on edit page

Like 0

Like

1 comments

Hi Fulgen,

 

The destroy method from the BaseNestedModule is called when starting adding a record to a detail. So in your case you need to override this method in case you need to add something to the destroy logic.

 

Best regards,

Oscar

Show all comments

Hi Community,

 

I have created one Process parameter of type "FILE" as follows:

I am trying to assign the value in a script task. The script task contains the following code:

var recordId = Get<Guid>("FileID");
 
IFileFactory fileFactory = UserConnection.GetFileFactory();
var fileLocator = new EntityFileLocator("ContactFile", recordId);
IFile file = fileFactory.Get(fileLocator);
 
Set("FILE",file);
 
return true;

After running the process I am getting the following error,

Request a help here to understand what am I doing wrong.

 

Thanks,

Sourav Kumar Samal

Like 0

Like

4 comments
Best reply

Hi Sourav,

 

The problem here is that this parameter stores not the file itself, but the file locator. If you redesign the code as:

var recordId = Get&lt;Guid&gt;("FileID");
IFileFactory fileFactory = UserConnection.GetFileFactory();
var fileLocator = new EntityFileLocator("ContactFile", recordId);
Set("FILE", fileLocator );
return true;

the process will be executed properly.

 

Best regards,

Oscar

Hi Sourav,

 

The problem here is that this parameter stores not the file itself, but the file locator. If you redesign the code as:

var recordId = Get&lt;Guid&gt;("FileID");
IFileFactory fileFactory = UserConnection.GetFileFactory();
var fileLocator = new EntityFileLocator("ContactFile", recordId);
Set("FILE", fileLocator );
return true;

the process will be executed properly.

 

Best regards,

Oscar

Oscar Dylan,

Thanks for the Input, It is working now

Sourav Kumar Samal,

 



How did you add the Using for IFileFactory and GetFileFactory?



Regards,

Solem.

Solem Khan Abdusalam,

 

You can add the using under "Methods" tab of process settings as follows,

 

 

Thanks,

Sourav

Show all comments

Hi Community,

I need to skip the mini-page which comes when we click "complete" on any user task in a DCM.As soon as the complete button is clicked the user task should be marked complete. Is there any way or examples to do so.

Thanks 

Like 0

Like

8 comments

Hello,

 

The method that is being called when clicking the complete button in the user-task is "execute" from the "ActivityDashboardItemViewModel" module. It checks if the item that needs to be completed has the mini-page or if it's an email activity or a process activity and then executes its logic. If none of the conditions are met the "execute" method from the "EntityDashboardItemViewModel" is called (parentMethod for the "execute" method in the "ActivityDashboardItemViewModel"). So in case you need to autocomplete the task you need to override the logic of this "execute" method (and unfortunately we don't have a specific example on this matter).

 

Best regards,

Oscar

Oleg Drobina,

 

It seems we can not create the replacing schema for EntityDashboardItemViewModel or ActivityDashboardItemViewModel. Is there any suggestion where we can override the 'execute' method to add the custom logic?

 

Regards,

Sourav

Sourav Kumar Samal,

 

Actually there is a possibility to override this logic:

 

1) Create the module with UsrActivityDashboardItemViewModel name and the following code (copied the original code from the ActivityDashboardItemViewModel):

define("UsrActivityDashboardItemViewModel", ["UsrActivityDashboardItemViewModelResources", "ProcessModuleUtilities",
		"ConfigurationConstants", "EntityDashboardItemViewModel", "MiniPageUtilities"],
	function(resources, ProcessModuleUtilities, ConfigurationConstants) {
		Ext.define("Terrasoft.configuration.UsrActivityDashboardItemViewModel", {
			extend: "Terrasoft.EntityDashboardItemViewModel",
			alternateClassName: "Terrasoft.UsrActivityDashboardItemViewModel",
 
			Ext: null,
			sandbox: null,
			Terrasoft: null,
 
			columns: {
				/**
				 * Process element identifier.
				 */
				"ProcessElementId": {
					type: Terrasoft.ViewModelColumnType.ENTITY_COLUMN,
					dataValueType: Terrasoft.DataValueType.STRING
				},
				/**
				 * Indicates if button "Execute" was clicked.
				 */
				"ExecuteButtonClick": {
					type: Terrasoft.ViewModelColumnType.ENTITY_COLUMN,
					dataValueType: Terrasoft.DataValueType.BOOLEAN
				}
			},
 
			/**
			 * @inheritdoc Terrasoft.BaseDashboardItemViewModel#initIconSrc
			 * @overridden
			 */
			initIconSrc: function() {
				var iconSrc = resources.localizableImages.IconImage;
				this.set("IconSrc", iconSrc);
			},
 
			/**
			 * @inheritdoc Terrasoft.EntityDashboardItemViewModel#addQueryColumns
			 * @overridden
			 */
			addQueryColumns: function(esq) {
				this.callParent(arguments);
				esq.addColumn("Title", "Caption");
				esq.addColumn("Type");
				esq.addColumn("StartDate", "Date");
				esq.addColumn("Owner.Name", "Owner");
				esq.addColumn("ProcessElementId");
			},
 
			/**
			 * @inheritdoc Terrasoft.BaseDashboardItemViewModel#getProcessElementUId
			 * @overridden
			 */
			getProcessElementUId: function() {
				return this.get("ProcessElementId");
			},
 
			/**
			 * @inheritdoc Terrasoft.BaseDashboardItemViewModel#execute
			 * @overridden
			 */
			execute: function(options) {
				console.log("test");
				var schemaName = this.get("EntitySchemaName");
				var hasMiniPage;
				const parentMethodArguments = arguments;
				const parentMethod = this.getParentMethod();
				Terrasoft.chain(
					function(next) {
						this.showBodyMask();
						if (Terrasoft.Features.getIsEnabled("OpenEditPageInDcm")) {
							this.hasMiniPageForMode(schemaName, Terrasoft.ConfigurationEnums.CardOperation.VIEW, next, this);
							return;
						}
						hasMiniPage = this.hasMiniPage(schemaName);
						next(hasMiniPage);
					},
					function(next, hasMiniPage) {
						this.hideBodyMask();
						if (!this._isEmailActivity() &amp;&amp; this.isActivity() &amp;&amp; hasMiniPage) {
							this.showMiniPage(options);
							return;
						}
						var elementUId = this.get("ProcessElementId");
						var recordId = this.get("Id");
						var config = {
							procElUId: elementUId,
							recordId: recordId,
							scope: this,
							parentMethodArguments: parentMethodArguments,
							parentMethod: parentMethod
						};
						if (ProcessModuleUtilities.tryShowProcessCard.call(this, config)) {
							return;
						}
						parentMethod.call(this, parentMethodArguments);
					},
					this
				);
 
 
			},
 
			/**
			 * Returns true if it is task activity entity.
			 * @private
			 * @return {Boolean} True if it is task activity entity.
			 */
			isActivity: function() {
				var executionData = this.get("ExecutionData");
				var schemaName = this.get("EntitySchemaName");
				return this.Ext.isEmpty(executionData) ||
					(executionData &amp;&amp; schemaName === executionData.entitySchemaName);
			},
 
			////TODO #CRM-33987
			/**
			 * Returns if current activity is email.
			 * @returns {Boolean} Returns if current activity is email.
			 */
			_isEmailActivity: function() {
				var activityTypes = ConfigurationConstants.Activity.Type;
				var typeLookup = this.get("Type");
				return typeLookup.value === activityTypes.Email;
			},
 
			/**
			 * @inheritdoc Terrasoft.BaseDashboardItemViewModel#onExecuteButtonClick
			 * @overridden
			 */
			onExecuteButtonClick: function() {
				this.set("ExecuteButtonClick", true);
				this.callParent(arguments);
			},
 
			/**
			 * @inheritdoc Terrasoft.BaseDashboardItemViewModel#onCaptionClick
			 * @overridden
			 */
			onCaptionClick: function() {
				this.set("ExecuteButtonClick", false);
				this.callParent(arguments);
			},
 
			/**
			 * @inheritdoc Terrasoft.MiniPageUtilities#openMiniPage
			 * @overridden
			 */
			openMiniPage: function(config) {
				if (this.get("ExecuteButtonClick")) {
					var status = {
						name: "ActivityMiniPageStatus",
						value: "Done"
					};
					if (config &amp;&amp; this.Ext.isArray(config.valuePairs)) {
						config.valuePairs.push(status);
					} else {
						config.valuePairs = [status];
					}
				}
				this.callParent(arguments);
			}
		});
	});

the only modification was console.log("test") to check the override.

 

2) Create a replacing view module for the SectionActionsDashboard with the following code:

 define("SectionActionsDashboard", ["UsrActivityDashboardItemViewModel"],
	function() {
		return {
			mixins: {},
			methods: {
				initDashboardConfig: function() {
					this.callParent(arguments);
					const dashboardConfig = this.$DashboardConfig;
					const activityItemsConfig = {
						"Activity": {
							viewModelClassName: "Terrasoft.UsrActivityDashboardItemViewModel"
						}
					};
					Ext.merge(dashboardConfig, activityItemsConfig);
					this.$DashboardConfig = dashboardConfig;
				},
			},
			diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
		};
	}
);
 

3) Refresh the page after saving these two modules.

 

As a result you can modify the "execute" method logic in the UsrActivityDashboardItemViewModel module.

Oleg Drobina,

 

I have tried the exact same steps, but getting the below error,

 

 

 

Is there anything I missed?

 

Regards,

Sourav Kumar Samal

Sourav Kumar Samal,

 

the same approach on my side doesn't return an error. You need to double-check all the code and that it has the same content as mine shared above.

Oleg Drobina,

 

I tried in a different instance, the error didn't come. But when I click on "Complete", it refers to the ActivityDashboardItemViewModel in stead of SKSActivityDashboardItemViewModel.

 

 

Also, I can see initDashboardConfig referencing to the correct schema, but still execute method is not,

 

 

Regards,

Sourav

Sourav Kumar Samal,

 

Hi, did you mange to solve this issue? 

Thanks in advance for your reply.

Kind regards,

Marijana

Oleg Drobina,

How can I do this in FreedomUI?

Show all comments

Dear Devlabs,

 

which version of IBM messaging queue is supported by the adapter from marketplace?

 

BR

Like 0

Like

5 comments

Hello Valery,

 

Could you please elaborate on your question?

Please describe the desired result after receiving the requested information.

 

Thank you,

Artem.

Hi Artem,

 

thank you for your feedback.

 

I want just outline what I expect. 

My expectation is the number of latest version of  IBM MQ with which the adapter works properly.

 

BR

 

 

 

Hi, Valery!

We are using version 8.0.0.7 of the external library from IBM MQ.

As such, the add-on is compatible with IBM MQ 8.0.

We haven't tested the compatibility with the latest versions of IBM MQ.

Yevhen Vorobiov,

Hi, Yevhen,

 

thank you for your reply. Please advise me about plugin compatibility with IBM MQ 9 (9.0, 9.1, 9.2) version.

Valery,

Hi Valery!

Since we have not tested the compatibility with the latest versions of IBM MQ, we cannot provide an advice. You might want to test this on your end.

Show all comments

Hello,

 

I have created several pages in the case section. Each page corresponds to a different value of the service column.

 

My question is how can I do the same on the mobile app side? like the user gets to choose which service he wishes to request and the corresponding case page is displayed.

 

Thank you,

Like 0

Like

1 comments

Hello Mariam,

 

Thank you for your question!

Unfortunately, such functionality is not available in the mobile app.

We have already registered a request for our development team so they will bring this feature in future releases.

 

Best regards,

Artem.

Show all comments

Hi community

 

I tried to customize the edit page actions following this article Add an action to the record page | Creatio Academy.

t the bindTo for caption, enable and tag property doesn't work

What Am I doing wrong ?

 

Like 0

Like

2 comments

Hi Stefano,

 

Most probably, the issue happens because you d didn’t add the code to this schema that checks if these actions are enabled. 

 

There are actually two places you need to add this. Once to the section page and once to the edit page for the section. An edit page can be seen in two different modes, (1) edit mode (where you're only displaying the edit page, this is what you're getting when you refresh the page while in edit mode) and (2) combined mode, this is actually the section page, where it displays the context of the section list you were on with the edit page on the side. 

With this in mind, you need to add the action menu in both the edit page and the section page for it to appear in both modes.



Best regards,

Bogdan

Thank you Bogdan,

I solved with your help.

Show all comments

Hi Community,

 

We have integrated our facebook page in Creatio as per this guide (https://academy.creatio.com/docs/user/setup_and_administration/base_int…). But we are not receiving the messages in CRM. Any idea whats missing?

 

 

Like 0

Like

2 comments

Sorry to ask the obvious. Have you added users to the All agents queue? Also, are the users "active" in the chat panel? (green circle, not red, around the chat icon)

Ryan Farley,

 

Hi Ryan,

 

Thank you for your reply, yes we have added our user to the all agents queue

Show all comments

Hi Community,

I have a requirement that when I change the case manually from New to PO Issued, it need to check whether the amount in Include Tax from Amount details and the sum of all the Amount from RR Allocation Table is Equal or not. If not equal then a Pop-up will come and the stage change back to previous one.

Can anyone help me how to configure the requirement in the backend ?

 

 

Regards,

Jagan

Like 0

Like

3 comments

Hello Jagan,

 

I am afraid there is no ready OOTB logic to perform checks when changing the stage, as well as there, are no OOTB pop-up windows, but there is a work-around:

 

To have a pop-up windows element in business processes you will need the following marketplace solution: 

https://marketplace.creatio.com/template/popup-element-business-process…

 

You will need to create a Business Process that will be triggered as the stage is changed and check whether the values are equal. In case they are not - show the pop-up window and return the case to the previous stage. Should the values be fine - the Business Process won't change anything.

 

I hope our recommendation helps you to solve this task.

 

Best Regards,

Dan

Denis Bidukha,

Hello Dan,

I have created a business process for the requirement but sometimes the pop-up window is coming and sometimes it is not coming. So I want to achieve it through code in the backend.

 

Thanks,

Jagan

Jagan Nayak,

 

Alternatively, you can add an asyncValidate method to your page and it will be called on the save of the page. 

Basically, you need to create a validation method, that returns 

result = {
success : true
 } 

if the validation was successful, otherwise it should return 

result = { 
success : false 
 }

Inside the validation method, if the validation is not passed, you can call 

Terrasoft.showInformation(message); 

for example: 

Terrasoft.showInformation('Amount A is not equal to Amount B '); 

and then call your validation method  inside asyncValidate method. 

 

You can read more about the validation here : 

https://academy.creatio.com/docs/developer/getting_started/develop_appl…

and more on asyncValidate here :

https://community.creatio.com/questions/lead-status-validation-0



Best regards,

Yurii. 

Show all comments

Hi Community,

 

We are currently integrating our contact page via landing page functionality in Creatio, however we are getting below error. Any idea how we can fix this?

 

Like 0

Like

3 comments

Hello Fulgen, 

 

Could you please provide us with a bit more information regarding the issue? On which step exactly the issue occurs or how it can be reproduced?

Thank you in advance!

 

Best regards,

Anastasiia

Anastasiia Zhuravel,

 

On submit

 

landing.createObjectFromLanding(config);

Hello Fulgen,

 

This is a known problem for the version of the site 8.0, our developer team is currently working to fix it in further releases. 

 

In order for us to assist you further we would need to have more information, please  send an email to support@creatio.com explaining this issue.

 

Best regards,

Dariy

Show all comments

Hi All,

I want to get value from a column "X" present in Parent Section "A" into the edit page of Child Section "B" which is present as detail in Section "A". Can anyone guide me how i can achieve it without using ESQ.

Like 0

Like

3 comments

You can do it by setting the "defaultValues" of the detail. I have an article on this here: https://customerfx.com/article/passing-values-from-a-page-to-a-new-reco…

Ryan

Hi Ryan,

I need to get the values dynamically i.e. if the value of field changes in parent section, i need to get the updated value.is there a way in which i can use this.get() for it?

rajat patidar,

You'd either need to do ESQ from the detail page to read the parent record, or you could do it as a process that fires when the parent is updated to update the detail row(s).

Ryan

Show all comments