I want to make a generic method, which will give me for each input 

 

"bdcfc348-9df5-f345-cb20-14103f818794" .... />

 

for every $context._crtControls element. 

 

i want to add Focus event handler. 

 

in the given example it has "PlaceOfBirth" key. 

 

 

Like 0

Like

5 comments

This can be achieved in DOM with the code like:

const textEl = document.getElementsByClassName("crt-input-control")[0].childNodes[0]
textEl.addEventListener('focus', (event) => {
    event.stopPropagation();
    console.log('focused');
})

But you need to study the page content to properly process the NodeList and add the focus event to the needed input.

.

Oleg Drobina,

That is the problem, that I can't find out to which attribute the input belongs 

Davit Gharagebakyan,

 

how about using textEl.ariaLabel to get the label (caption) for the input and use it to identify the needed element?

Oleg Drobina,

in my case area label is BIrthplace (for example). I don't have such a text in context. (only in very deep nested objects =>

 

 

 $context.viewModelGenerator.injector._lView[3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][8]._faviconService._sysSettingsService.httpClient.handler.injector.parent.parent.records[11][1].value._modules[0].instance._crtInjectionContextService._injectionContextsMap[0][1]._injector.records[3][1].value._crtRouter._location.
window.handlerChain._handlersCache[18][1][0][1]._next._injector.records[3][1].value._routerOutletHistory._items[8].view.pageRef.instance.schemaState.models[0]._dataSourceFactory._dataSourceRepository._repository[2][1]._queryExecutor._httpClient.handler.injector.records[1291][1].value.cachedInjectors[0][1].records[297][1].value._dragDropRegistry._drop
Instances[0].data._changeDetectorRef._lView[3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][3][8]._cacheService._componentRefCache[0][0].instance.refs.root.changeDetectorRef._cdRefInjectingView[19].queries[0].queryList._results[0].changeDetectorRef._lView[4][4][4][8][0]._lView[13][9][0][3][3][3][3
][3][3][3][3][4][8][0]._lView[4][7][0]._results[0]._closestTab._closestTabGroup._tabs._results[0]._viewContainerRef._lContainer[4][9][0][13][8][0]._lView[13][8][0]._lView[19].queries[1].queryList._results[0]._rendered[0][0]._declarationLView[19].queries[3].queryList._results[0].changeDetectorRef._lView[4][4][4][4][4][4][4][8][0]._lView[13][4][4][8][0]._lView[30]

Show all comments

Hello,
 

I'm facing an issue with the AddTaskMiniPage. When attempting to create a task, I receive the following error message:
 

Field: "Id".
Error: Enter a value after clicking Save.
 

This prevents me from successfully creating tasks. I'm able to create tasks fine in the full window page. Has anyone encountered this issue before or knows how to resolve this?
 

Thanks!

Like 0

Like

3 comments

Hello,

Most likely, the issue lies with a base business rule at the object level that sets this value. I recommend disabling this rule, and after doing so, the behavior should not be repeated.

Best regards,
Antonii.

 


Antonii Viazovskyi,

Hello,

Thanks for your reply.

I disabled all the business rules, but I’m still getting the same result (Field: "Id". Error: Enter a value).

Interestingly, I have no issues if I click the "Continue in other page" button, which takes me to the full-page window.

Any further advice would be appreciated.

Thanks,
Romeo

Romeo Suarez,

 

Hello!

This issue can happen when you have feature DisableModelBindAttributeSynchronization enabled on your site.

To access the feature list, open the following link:
your_site/0/Nui/ViewModule.aspx#Section/AppFeature_ListPage

I hope this helps.
Have a great day!

Show all comments

Hi community,

 

The situation is the following :

 

 

To have some context, after importing some data from an Excel file in the "Calculateur" detail it does some calculations in the "Informations Prix" detail.

 

However, now when trying to implement a business process needed to recalculate the values in the “Informations Prix” detail when we delete some records, I encounter some problems.

I have tried to put a start signal as “When a ‘Calculateur’ is deleted” it starts the process. However, the problem is that I can’t obviously get the Id of the opportunity and the Id of the other calculator records related to it because the record is deleted and only AFTERWARDS it starts the process. So, the business process doesn’t find the Id of the “Calculateur” or the Opportunity related to the deleted record.

 

A good thing to note is that every record of the “Calculateur” has its own Id.

 

Furthermore, I have tried to start the process on an Event like this :

 

 Here, right next to the checkbox, it says : “Before deleting a record”

 

And to start the business process with a “Message signal” with “CSLCalculateurDeleting” as message. However, I don’t really understand how this works because I can’t get the Id of the opportunity anyway.

 

In addition to all this stuff, my idea, according to this article that tried to answer the same need as mine :

 

 

So, my idea was to implement a “Delete” button next to the “Calculateur” detail that will delete the selected record, get the Id of the Opportunity and start a process which now could have all the parameters that I need for my further recalculations. However, how can I get, in the JavaScript Client Side part of code, the Id of the selected record to delete ? See this example :

 

 

I want the Id of the record highlighted in blue.

 

What is the best way to implement this according to the different possibilities above ? Do you have any idea ?

 

Many thanks for the attention paid to this long question. Hopefully you can help me figure this out.

 

Best regards,

Jonathan

Like 0

Like

2 comments

Stop using the normal Delete of a record by rights and instead force users to Delete with a business process.

The business process then runs the logic and then Deletes record in the end. So far so good.

It's simpler to maybe run the Business process from the record page. (Double-click row to open). If you wanna use a button on the row, check this out: https://community.creatio.com/articles/add-button-active-row-detail

Hi Julius,

 

Thanks for your answer. I have found the answer to my questions and it was really simpler that I thought.

 

In fact, on the start signal of the process it is necessary to unthick the checkbox :

 

 

So that it is possible to get the Id of the opportunity related to the deleted record.

 

Best regards,

Jonathan

Show all comments

I would like to know how to listen to merge event with business process.

For instance, delete, create and modify events are there:

420.png

I would like to get Id of an entry that was merged, and then use it in business process. 

"Modify" is not always applicable. Sometimes an entry is not considered modified when merged.

Thanks in advance

Like 0

Like

1 comments

Hello Yuriy, 

There is no such out of the box functionality that allows you to subscribe on merge event due to unexisting of such event.

As workaround, you may try to modificate Deduplication process (starts when records are merging). The records that remains in the database is called golden record and id of golden record is the first id in collection that is transferred to deduplication process. 

So once you have this golden record, you may process is it as you wish.

Also please note that process of merging records is asynchronous. 



Regards,

Alex

Show all comments

Hi everyone,

We created a custom entity that has a Contact lookup called [UsrConsumidor] and we need to get a value from a Contact's field called [UsrTotalPtsAcumulados].



We got an exemple from the bpm'online academy (https://academy.bpmonline.com/documents/technic-sdk/7-10/entityschemaqu…) and followed the exactly same structure, but it's not working. 

​var contactId = this.get("UsrConsumidor");
 
// Create Terrasoft.EntitySchemaQuery class instance with [Contact] root schema.
	var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
	rootSchemaName: "Contact"
});
 
// Add column with name of main contact of accounts that refers to given contact.
esq.addColumn("UsrVouchers.UsrConsumidor.UsrTotalPtsAcumulados", "ContactTotalPtsAcumulados");
 
// Get one record from selection on the basis of [Id] of card object and display it in an info window.
esq.getEntity(contactId, function(result) {
	if (!result.success) {
		// error processing/logging, for example
		this.showInformationDialog("Data query error");
		return;
	}
	this.showInformationDialog(result.entity.get("ContactTotalPtsAcumulados"));
}, this);

The error that is given in the console is: "errorCode: "FormatException", message: "Expected hex 0x in '{0}'." "

Am I doing something wrong or is there an easier way to get an object by ID?

Best regards,

Rogério Zampieri.

Like 0

Like

1 comments

Dear Rogerio,

You don't need to join tables, your root schema is already "Contact", you just need to specify the filter.

Moreover, please use this statement to achieve Id of the contact:

​var contactId = this.get("UsrConsumidor").value



 

​var contactId = this.get("UsrConsumidor").value;
 
// Create Terrasoft.EntitySchemaQuery class instance with [Contact] root schema.
var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
	rootSchemaName: "Contact"
});
 
// Add column with name of main contact of accounts that refers to given contact.
esq.addColumn("UsrTotalPtsAcumulados");
esq.filters.add("IdFilter", esq.createColumnFilterWithParameter(
				Terrasoft.ComparisonType.EQUAL, "Id", contactId));
 
// Get one record from selection on the basis of [Id] of card object and display it in an info window.
esq.getEntity(contactId, function(result) {
	if (!result.success) {
		// error processing/logging, for example
		this.showInformationDialog("Data query error");
		return;
	}
	this.showInformationDialog(result.entity.get("ContactTotalPtsAcumulados"));
}, this);

Regards,

Anastasia

Show all comments