I have a need to intercept record merging events (deduplication).

In the case of merging records, store information about the ID of the deleted record (which was merged and deleted) in the registry of deleted objects, which has already been created, but only deleted records are written there, and not those that were a duplicate and were simply merged and, accordingly, deleted.

Implement a mechanism that will store information about the user who performed the merge and the exact time of the operation. Is this even possible?

Like 1

Like

1 comments
Best reply

Theoretically it's possible. When triggering the merge the MergeEntityDuplicatesAsync method from the DeduplicationService is triggered. This is a public method that can be overridden. The body of the request is a JSON like below (in this case I was merging two documents):

{"schemaName":"Document","groupId":1,"deduplicateRecordIds":["054ac2b7-6840-4cc8-881e-b268b0891459","c467e547-cbff-4ae7-b146-93eff47f1ce6"],"mergeConfig":"{\"Number\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\",\"Date\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\",\"Account\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\"}"}

deduplicateRecordIds is an array with Ids of two records that I selected before triggering the merge.

In the mergeConfig body we have \"Number\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\ - this is an Id of the record that was left in the app after the merge. So we have

 

"054ac2b7-6840-4cc8-881e-b268b0891459","c467e547-cbff-4ae7-b146-93eff47f1ce6

 

in the deduplicateRecordIds array and 467e547-cbff-4ae7-b146-93eff47f1ce6 is left in the app. This means that 054ac2b7-6840-4cc8-881e-b268b0891459 was removed. So this Id should be added to the log table (for example using InsertQuery class). As for the user that performs merge - we can try retrieving this information using UserConnection.

 

Alternatively you can dig into the possibility of overriding the base merge button click (that will also trigger the "DeduplicationActionProcess" business process (see the process log after the merge is triggered)) and bind calling your custom business process that will do the same operation as the base process (create a copy of the process and trigger it instead of the base process) and using it you will also be able to log deleted record and user who performed the merge.

Theoretically it's possible. When triggering the merge the MergeEntityDuplicatesAsync method from the DeduplicationService is triggered. This is a public method that can be overridden. The body of the request is a JSON like below (in this case I was merging two documents):

{"schemaName":"Document","groupId":1,"deduplicateRecordIds":["054ac2b7-6840-4cc8-881e-b268b0891459","c467e547-cbff-4ae7-b146-93eff47f1ce6"],"mergeConfig":"{\"Number\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\",\"Date\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\",\"Account\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\"}"}

deduplicateRecordIds is an array with Ids of two records that I selected before triggering the merge.

In the mergeConfig body we have \"Number\":\"c467e547-cbff-4ae7-b146-93eff47f1ce6\ - this is an Id of the record that was left in the app after the merge. So we have

 

"054ac2b7-6840-4cc8-881e-b268b0891459","c467e547-cbff-4ae7-b146-93eff47f1ce6

 

in the deduplicateRecordIds array and 467e547-cbff-4ae7-b146-93eff47f1ce6 is left in the app. This means that 054ac2b7-6840-4cc8-881e-b268b0891459 was removed. So this Id should be added to the log table (for example using InsertQuery class). As for the user that performs merge - we can try retrieving this information using UserConnection.

 

Alternatively you can dig into the possibility of overriding the base merge button click (that will also trigger the "DeduplicationActionProcess" business process (see the process log after the merge is triggered)) and bind calling your custom business process that will do the same operation as the base process (create a copy of the process and trigger it instead of the base process) and using it you will also be able to log deleted record and user who performed the merge.

Show all comments

I'm trying to improve a UX flow in one of our clients, and to do so I'm hoping it would be possible to create a modal dialog box which can have a date selected from a date picker, but I can't see any obvious ways - is there anything that can be done for this? I saw this excellent guide on getting a Yes/No type dialog in Freedom UI, but I can't see any extra capabilities for potentially adding more freeform user interaction: https://customerfx.com/article/showing-a-message-dialog-or-confirmation…

 

Any help would be greatly appreciated. Currently on Creatio CRM 8.1.0

Like 0

Like

10 comments
Best reply

Hi Harvey,

I've done this in several areas in our system using modal forms (actually called a Mini Page in the page types dialog you select from when creating a new page). Here's an example of a dialog allowing the case status to be set from a list (we don't use editable lists yet since there's no way to add validators yet to lists):

This is just a modal/mini form created using the form designer. The nice part about this is that it can be bound directly to the object (I have many that aren't bound as well, depending on the scenario).

You can open this specific page for a particular record using this method (also possible with an action in no code designer as well) https://customerfx.com/article/opening-a-record-for-edit-in-a-specific-…

Ryan

Hi Harvey,

I've done this in several areas in our system using modal forms (actually called a Mini Page in the page types dialog you select from when creating a new page). Here's an example of a dialog allowing the case status to be set from a list (we don't use editable lists yet since there's no way to add validators yet to lists):

This is just a modal/mini form created using the form designer. The nice part about this is that it can be bound directly to the object (I have many that aren't bound as well, depending on the scenario).

You can open this specific page for a particular record using this method (also possible with an action in no code designer as well) https://customerfx.com/article/opening-a-record-for-edit-in-a-specific-…

Ryan

Ryan Farley,

Thanks for the reply Ryan, that seems like exactly what we're after! I had wondered about using a Mini Page for it but wasn't sure how that would be hooked in to work. How are you triggering the mini page to be displayed, I take it it's from code? Is it using something like the following when clicking a button or whatever the trigger is:

const handlerChain = sdk.HandlerChainService.instance;
 
await handlerChain.process({
	type: "crt.CreateRecordRequest",
	entityName: "CustomEntity",
	entityPageName: "CustomEntityMiniPage",
	$context: request.$context,
	defaultValues: [{
		attributeName: "Col1",
		value: "Val1"
	}]
});

 

Or are you able to get a Mini Page to appear without some entity it's based over? For our requirements, the data field to be modified would actually be on the entity of the Form Page the user was currently on, so it didn't seem like the crt.CreateRecordRequest would make sense, but the crt.OpenPageRequest always seems to open the Mini Page as though it were a full-sized page, and the crt.UpdateRecordRequest I hadn't tried yet as I didn't already have a Mini Page for the entity and thought it likely wouldn't work as the mini pages are generally used for adding data, not editing?

 

Thanks again.

There's so many uses of modal (mini) pages beyond just what mini pages were used for typically in classic ui. 

IMO It's one of the best additions to Freedom UI, the ability to create dialogs for specific purposes, bound to a record or not, that really enhances the user experience. This is a prompt for selecting parameters for a report.

Ryan

Harvey Adcock,

You would use an "crt.OpenPageRequest". I edited my original post to include a link to an article showing how to open it to edit a record. 

Ryan

Harvey Adcock,

In older versions the "crt.OpenPageRequest" did open the page in full screen, even if a modal page. But I think that was fixed in 8.0.10 and has been working for me (it does open as a modal)

Ryan

Perfect, thanks Ryan, really helpful!

Ryan Farley,

 

One more question, is there a way to pass information from the current page to the page being opened via the OpenPageRequest? Trying defaultValues, similar to what you would use when creating a new record from a page launched by code, doesn't seem to have any effect, and I can't see any other candidates for it.

Harvey Adcock,

I’m not 100% sure but I think you can only pass values for a new record (crt.CreateRecordRequest) only. 

Alternatively, you could write some values to a global or use the StorageUtilities module and then read from the form once opened. See StorageUtilities here: https://customerfx.com/article/persisting-data-between-pages-in-creatio…

Ryan

Harvey Adcock,

You can try something like this to pass defaultValues

request.$context.executeRequest({
	type: "crt.OpenPageRequest",
	$context: request.$context,
	schemaName: "UsrYourCustom_FormPage",
	modelInitConfigs: [
		{
			action: sdk.ModelInPageAction.Edit,
			recordId: yourRecordId
		},
		{
			defaultValues: [
				{
					attributeName: "someName",
					value: "someValue"
				}
			]
		}
	]
});

 

Alex Zaslavsky,

 

Does this passing of values work for passing a value into a Page Parameter? Or is there some way to do so? The value I want to pass to a new page (either through OpenPageRequest or CreateRecordRequest) is not on the entity, it's just a parameter on a page, but we need to set this value when opening the page.

Show all comments

Has anyone encountered the following problem with the Advanced filter for Creatio by DEVLAB:

 

- When you CREATE a filter/folder,  by default it takes the ALL column configured view  =   which is OK

- You may change the columns view and SAVE the folder view.

- When you click the folder, the configured column view of the filter is displayed with the data.

- When you EDIT the filter, change a criteria and click APPLY....the configured view is taking the Default ALL collumn configuration (GLITCH)

- But if you SAVE the filter with the updated criteria....then the column view is back to what it was configured

 

 

Can I communicate with the developer(s) who did that to make an update ?

 

Also...When I UNINSTALLED the package and RECOMPILE....the system still has the GLITCH. (outch !!!)

 

Like 1

Like

3 comments

Hi Francois,



Thank you for bringing this matter to our attention.

The developer has resolved this issue and published the new version of the application on the Creatio Marketplace.

 

Please install the latest version via the following link: Advanced list setup for Creatio

Hello...While fixing the previous bug...I believe another one came up.

When accessing a CASE (or any object), if you click on the ACCOUNT of the CASE and come back...for some reason the system doesn't know where it was and keeps displaying the Loading Icon with a brighter screen.

 

He're a short video to help you understand the problem :



vtq-media.com/Video-Library/BUG-display-when-returning-from-a-detail-page.mp4

 

Can you fix that ?



SEE CASE below opened to Support@creatio.com 

Case #SR-01273076: VTQ-CANADA - Bug display when returning from a detail page

 

Oleg Drobina  (Creatio Support)

2/29/2024 at 1:31 PM

Hello Francois,



Thank you for the video and the explanation!



After studying the behavior, we could reproduce it out-of-the-box after installing this Marketplace addon https://marketplace.creatio.com/app/advanced-list-setup-creatio. This addon directly provokes the behavior you've described.


 

Any updates on that issue ?

Show all comments

Hello Everyone,

I have implemented saving functionality in Freedom Ui.

const saveRecordRequest = {

    type: "crt.SaveRecordRequest",

    preventCardClose: true,

    $context: request.$context

};

                     

// now execute the save request and check if it was successful

if ((await request.$context.executeRequest(saveRecordRequest))) {

    // save was successful, continue with something else here

}

else {

    // save was not successful (maybe due to required fields not being filled in)

}

I have followed this link

https://customerfx.com/article/saving-a-page-before-some-action-on-a-cr…;

it is saving  the record but after saving record it is  not automatically coming to list page as save button functionality is working.

Can anyone Please guide me here, How I can get that

Like 0

Like

2 comments

What is the behavior you're expecting? Can you outline the scenario you're trying to accomplish? 

In the code you're including preventCardClose: true which specifically tells the page to not close after saving. If you want the page to close after the save, you need to remove that part (or change to false). However, there could be other factors of what a page does after saving (you could force the navigation back to the list using some code if wanted)

Ryan

preventCardClose:false , this works for me .Thank you  @Ryan for guiding me

Show all comments

Greetings,



I was curious as to whether there was a way to setup a BPM filter to pull customers that are about to become 18 years of age and send them a message about product opportunities available to them. Thanks in advance for any assistance.



Best,



Lucas

Like 0

Like

4 comments

Hi Lucac,



You can create a dynamic folder based on needed conditions.

 

And add the campaign audience from a dynamic folder, as well as from a custom filter. 

Bogdan,

Yes, however how would we set up the automation to pull a member who is a about to turn 18 for example, in the next 6 months?

Lucas Centeno,

I didn't test this out, but it would likely work to use: 

  • Age = 17
  • Birth date Within Previous 6387 Days (which is 17 1/2 years in days)

Ryan

Ryan Farley,

Thank you for the guidance, Ryan. Unfortunately, the filtration provided did not work. It would be nice to have a "Within" or "Between" filtration feature in Creatio in addition to "=" ">" "<", etc.

Show all comments

Hello community,

 

Can portal users import files?

 

In operation permissions, in 'CanImportFromExcel' where we define the users who can import files, it is possible to add the organizational role 'all portal users,' but users still can't import.

 

 

Is it possible for them to import files?

 

Thank you!

 

Best regards,

Andreia

Like 0

Like

2 comments

Hello,



According to the application logic, the portal user cannot import data. Because the portal functionality is limited, and import is available only for administrators by default.



We will register an idea for our developers to consider the possibility of importing for portal users. Currently, this can only be done by internal users.

Malika,

Thank you, Malika, for the reply.

Show all comments

Hi Everyone,

 

I am using a pre-configured page in my process. But it is not showing. When I start the process with the Start signal along with the save record, it doesn't appear but when I use the button to run the process, it appears. How can I make the page appear with a Start Signal? Thanks!

Like 0

Like

4 comments

Hi Hassan!

 

We recommend checking the configuration of the start signal. If the page appears when you manually start the process, then it is likely that the start signal for record creating wasn't configured correctly.

Please check if the process starts, you can check it in the System designer -> Process log. If the process didn't start, check the start signal configuration and make sure that the record created match the conditions.

 

You can get more information about start signal for creating a record on Academy: https://academy.creatio.com/docs/8.x/no-code-customization/bpm_tools/pr…

 

If you have checked the settings and still need help, please contact our support team for further analysis.

 

Best regards,

Alina

Alina Yakovlieva,

Hi Anna,

 

The process does start and it is in process. When I go to Logs, I can see the process at the Mini page stage. From there I can inspect the mini page and complete the process by clicking on the button.

Hassan Tariq,

In this case, please check the setting of the "Who performs the task?", maybe the page shows to another user. 

 

Also, you can check more information about the Pre-configured page set up on Academy: https://academy.creatio.com/docs/8.x/no-code-customization/bpm_tools/pr…

On the signal, make sure that "Run following elements in the background" is not checked.

Ryan

Show all comments

CAN ANY HELP ME ON Triggering a Client-Side Event When a Field is Changed on a Page in Creatio in Freedom UI?

Like 0

Like

4 comments

I have an article showing how to do this here: 

https://customerfx.com/article/responding-to-an-event-when-a-field-is-c…

Ryan

@Ryan I have to call a method inside field is changed .I have  used this approach but I am getting issue in this. Can you please help how we can call a function inside field value

 handler: async (request, next) => {

        if (request.attributeName === "BooleanAttribute_ddmdb1n") {

              await cfx.fieldChecked(); // 

        }

        return next?.handle(request);

    }

},

            {

                request: "cfx.fieldChecked",               

                handler: async (request, next) => {

                    const okBtn = {

                        key: "OK",

                        config: {

                            color: "primary",

                            caption: "YES"

                        }

                    };

                    const cancelBtn = {

                        key: "CANCEL",

                        config: {

                            color: "default",

                            caption: "Cancel"

                        }

                    };

                    const result = await request.$context.executeRequest({

                        type: "crt.ShowDialogRequest",

                        $context: request.$context,

                        dialogConfig: {

                            data: {

                                message: "Are you sure you would like to proceed? It will wipe out all the information!!!!",

                                actions: [cancelBtn, okBtn]

                            }

                        }

                    });

                    if (result === "OK") {

          request.$context.StringAttribute_uo3a61k = "";

                    }

You cannot put methods inside a Freedom UI page. Either move the code from cfx.fieldChecked into the change request handler, or you can move it to a module

Ryan

okay got it .Thank you for help

Show all comments

Hi,

 

We have a object for Sets in our Main Application. We are thinking of having a Mini page when we are saving a new record in our set object. So when a user adds a new entry to our Sets record page then when he is going to save it, there should be a pop-up to decide which entries they want to add and then when he selects them, then all data should be added to the record. How should I do this? I can make a process for adding a mini page?

Like 0

Like

2 comments

Bump

Hello!

 

Please note that this can be realized through 2 options:

- via business processes

- via development 



Unfortunately, we cannot provide you with specific recommendations on your question at this time, as such a scenario has not been studied and we have no examples of such a realization.

Show all comments

Hi Everyone,

 

We have the following business process in which we check if there are any previous Orders at the same time or even within 11 hours. If yes, then it will assign the Shift as double, if not then it will assign it as a single shift. However, there are 2 issues we are having.

 

  1. When there is an order at 12:00-13:00 and another order at 13:00-14:00 then technically it should be assigned as a double shift. But our current process still assigns a single shift.
  2. We need to add more checks to the previous order. For example: If the same team is assigned to the same location, then it should still be a single set. How can I do that? 

Kindly see the images for the process. Thanks! 

Like 0

Like

2 comments

Bump

Hello,

I suggest you check if the filtering conditions are being met.

  1. Try building the same filter in the Orders object and check if such records exist, and if there are more than 2 records. (We noticed that you have Finish Date < Start Date; we are not familiar with the logic of your object, but we recommend verifying the correctness of this filter.) Reference: How to work with data

  2. Enable process tracing to check the values returned by the process elements: Reference: Trace process

Regarding the second issue, you need to add more filters so that the records found in the Read Data element meet the required condition.



If you encounter further difficulties in configuring the process, please contact our support team at support@creatio.com.



Best regards,

Pavlo!

Show all comments