Hi all, 

  In the Next Steps approval element of Freedom UI, is it possible to add an additional button? We already have 'Approve' and 'Reject' buttons, but I would like to include a 'Revise' button as well.


Regards,
Elakkia 

Like 2

Like

0 comments
Show all comments

Dear colleagues,

 

In a Freedom ListPage, I need to process all the records that a user selects AND REPORT THE RESULTS AT THE END.

 

I'm having trouble figuring out how to approach this task. Currently, as I understand it, we call a process with the ID of the record to be processed.

 

Is there a way to know when all the selected records have been processed and know which ones?

 

I'm trying to implement a temporary table to insert the IDs of the selected records, but for this, I need to have a unique ID in that temporary table so that if there are multiple users doing the same thing, the current user's records are not mixed up. To do this, I've edited the code of the page where the service call is made to pass a second parameter to the process, an ID that I need to generate, but the generated ID is always the same "00000000-0000-0000-0000-000000000000":

			"parameterMappings": {
				"NotaCreditoID": "Id",
				"ProcesoID": Terrasoft.utils.generateGUID()
			},

 

What am I doing wrong with this approach?

 

Here is an excerpt of the modified code:

 

define("NdosNotasCredyDeb_ListPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {

 

"operation": "insert",
"name": "Button_ft2cncy",
"values": {
	"type": "crt.Button",
	"caption": "#ResourceString(Button_ft2cncy_caption)#",
	"color": "default",
	"disabled": false,
	"size": "large",
	"iconPosition": "only-text",
	"visible": true,
	"clicked": {
		"request": "crt.RunBusinessProcessRequest",
		"params": {
			"processName": "NdosLiberaDescartaNC_CC",
			"processRunType": "ForTheSelectedRecords",
			"showNotification": true,
			"dataSourceName": "PDS",
			"parameterMappings": {
				"NotaCreditoID": "Id",
				"ProcesoID": Terrasoft.utils.generateGUID()
			},
			"filters": "$Items | crt.ToCollectionFilters : 'Items' : $DataTable_SelectionState | crt.SkipIfSelectionEmpty : $DataTable_SelectionState",
			"sorting": "$ItemsSorting",
			"selectionStateAttributeName": "DataTable_SelectionState"
		}
	},
	"clickMode": "default"
},

 

On the other hand, has anyone done this in any other way? How?

 

Thank you very much

 

Julio

Like 0

Like

4 comments
Best reply

Hi Julio, 

As of Creatio 8.1.3 you can pass multiple records into a process using a collection parameter. This executes a single process for the collection of selected records. See an example in this article: https://customerfx.com/article/launching-a-process-for-multiple-records-in-a-creatio-list/

Ryan

I'm also tried sdk.generateGuid(), I test it on the console and returns a Guid, but for some reason the parameters is not delivered to the process, what's wrong?

Hi Julio, 

As of Creatio 8.1.3 you can pass multiple records into a process using a collection parameter. This executes a single process for the collection of selected records. See an example in this article: https://customerfx.com/article/launching-a-process-for-multiple-records-in-a-creatio-list/

Ryan

Ryan Farley,

Thanks Ryan,

 

I know and I use them, the problem is the process ran for each record individually and if I need to detect when it processes all selected records, generate a report like "Selected records xxx, processed records yyy" and actually this is not possible 

 

At least I don't know how to do this.

 

Thanks again

 

Julio

Thanks Ryan, your article solves my problem, great job as usual

 

Regards

Julio

Show all comments

Hi,

Anyone experienced the same error as me?

 

*UsrSomePage is not allowed due to ACL setup for *CurrentUser. Failed rules: - Object page settings rule.


HTPP: PostClient:


 

I have a classic page I'm trying to open from a freedom detail. My button works perfectly for Supervisor then opens the classic page, but for any other user it doesn't. The object has no permissions declared at the Object Permission section.

Let me know if you know anything.

PS
I tried adding System Administrator to User and the button works, but I don't want to do that. Object has no permission set-up. 

Regards,
Solem A.

Like 0

Like

2 comments
Best reply

Hello,

 

The possible reasons, why user can't open the page:
1. User does not have permissions to page data source. 
2. The list page is not added to any workplace, available for user. 
3. Another page is configured for the current user (or his role) in the object related pages.

 

Solution:
1. Set up correct permissions, workplaces (check 1-3 points above). 
2. Add page to the Whitelist of pages to bypass page opening restrictions lookup, if customer want to allow any user can open via direct URL regardless of configured permissions. 
3. Add user (or role) to CanBypassPageOpeningRestrictions system operation to bypass all restrictions. We strongly recommend to use correct configuration (not just bypass permissions) to provide the best level of security. 

Hello,

 

The possible reasons, why user can't open the page:
1. User does not have permissions to page data source. 
2. The list page is not added to any workplace, available for user. 
3. Another page is configured for the current user (or his role) in the object related pages.

 

Solution:
1. Set up correct permissions, workplaces (check 1-3 points above). 
2. Add page to the Whitelist of pages to bypass page opening restrictions lookup, if customer want to allow any user can open via direct URL regardless of configured permissions. 
3. Add user (or role) to CanBypassPageOpeningRestrictions system operation to bypass all restrictions. We strongly recommend to use correct configuration (not just bypass permissions) to provide the best level of security. 

Mira Dmitruk,


This worked for me, 
 

Add page to the Whitelist of pages to bypass page opening restrictions lookup, if customer want to allow any user can open via direct URL regardless of configured permissions.

 

Thank you!
Solem A.

Show all comments

Hi everyone,

I need to add validation checks and perform calculations on certain fields when the "Save All" button is clicked in a specific detail. 

Could you please guide me on how to add custom code to this button's click event? 

Which handler should I implement or override to achieve this?

Thanks in advance for your help!

Like 0

Like

1 comments

Hello Rachel,

When you click "Save All" button crt.SaveRecordsRequest is called.
Override this handler by implementing your version of it with logic you need.

Hope this helps 

Show all comments
Question

Hi community,

 

Is there a way to put an input mask on an input in freedom UI ? 
for example I have a text field and I want to have a mask "44[0-9]{8}"

It'd be best if I can pre-fill the input with the mask.

Like 0

Like

2 comments

Hello Yurii,

OOTB, we have input mask for Freedom UI phone number fields. This can be turned on in the designer:



Additionally, you can check out the following community post on how to add an input mask: https://community.creatio.com/articles/how-add-input-mask

I hope this helps.

Have a great day!

Alina Yakovlieva,

Thanks, I know about the phone number thing. The post you sent link to refers to old UI. Is there a way to create an input mask for Text field(not phone number) in FreedomUI ? Code works too

Show all comments

Hi,

Is there a way to alter the open record event of a detail row in Freedom so that it runs a particular event that I want? I see some example of HandlerChain, but those are primarily from a button.



Example, instead of opening the edit record page of the product when clicking "Motherboard..." I want to change what it does.

Regards,
Solem A.

Like 0

Like

1 comments
Best reply

Hello,

 

Find the _sendRequest method in the core file like 1964.1a6d8f3494eb48eb.js. This will show that the request sent when clicking the record is "crt.UpdateRecordRequest" (on the screenshot below I've clicked the Account column value for the record in the "Job experience" list on the contact page):

So in case you need to modify the logic you need to add a check for the UpdateRecordRequest and make sure it's called when clicking the needed column value (using the recordId parameter for example).

Hello,

 

Find the _sendRequest method in the core file like 1964.1a6d8f3494eb48eb.js. This will show that the request sent when clicking the record is "crt.UpdateRecordRequest" (on the screenshot below I've clicked the Account column value for the record in the "Job experience" list on the contact page):

So in case you need to modify the logic you need to add a check for the UpdateRecordRequest and make sure it's called when clicking the needed column value (using the recordId parameter for example).

Show all comments

Hey Community,

I'm looking to access the `onclick` / 'FolderTreeVisibleChanged' handler of the Folders button on Freedom UI list pages. What is the name of the handler method that i can use?


Like 0

Like

3 comments

Hello sprity,

If i understood you correctly, you want to control visibility state or togle mode of the folders tree. The handler you provided, well, is responsible for this logic.  

Here is an example of how you can do it:

Toggle mode (open if closed, close if open):

    request: 'crt.FolderTreeVisibleRequest', 
    params: { 
        folderTreeName: "FolderTree_blabla", 
        togglePanel: true 
    } 
}

Explicit visibility mode (always open or always close, regardless of current state):


    request: 'crt.FolderTreeVisibleRequest', 
    params: { 
        folderTreeName: "FolderTree_blabla", 
        visible: true  // or false to close 
    } 
}

As mentioned, this handler also saves the state to the user profile, meaning that when the page is reopened, the folder tree will be in the same state (open or closed) as it was before. If you'd prefer not to save the state in the profile, you can manually update the visibility attribute, like so:

{folder tree name}_visible => FolderTree_blabla_visible

Hope this helps! Let me know if i understood you correctly and if you have any questions let.

Yevhenii Grytsiuk,

Thank you for this Yevhenii. One of the more difficult parts of working with Freedom UI is the inability to dig into the out of the box code to see how to change the behavior. This was easy with classic, but for Freedom we have to dig through all the minified code to see if we get lucky finding what we are after. 
Until there's better documentation outlining what all the various requests are to handle, it would be great to have some sort of switch (like the IsDebug setting to enable debug mode) that just dumps all the fired requests to the console (and maybe include what object/component fired the request?) Not sure how reasonable that would be since it's likely quite a bit of stuff would show there, but might make it easier to see the requests that fire when some action is taken.

Ryan

Ryan Farley,

Sounds great to me. I will register your idea so that our r&d team hopefully would implement it.

Show all comments

Dear colleagues,

 

I'm facing an issue with filtering records in a ListPage. I need to implement a cascading lookup relationship between two Quick Filters:

  1. Quick Filter 1 (QF1): Category
  2. Quick Filter 2 (QF2): Subcategory
  3.  

My goal is to dynamically update the options in QF2 based on the selected value in QF1. For instance, if the user chooses "Category A" in QF1, QF2 should only display the subcategories associated with "Category A.", 

 

If user in QF1 selects Category A & C, in QF2, just see SubCategories associated with "Category A & C"

 

Is this functionality possible?

 

Thank you for your help.

 

Julio Falcón

Like 2

Like

1 comments

Hi,

 

We have consulted with the product owners of this feature, and we are sure that this task can only be achieved using development.

Also, we have created a request for our developers to bring this functionality in future releases.

Thank you for this suggestion; it helps make our product better!

Show all comments

Hello Creatio community

 

I have developed a page using Freedom UI. I want to develop some core functions that i want to call in different Freedom UI screens. For example function calculate as shown below.

 

define("ApplicationFormSection_FormPage", /**SCHEMA_DEPS*/["@creatio-devkit/common"]/**SCHEMA_DEPS*/, function/**SCHEMA_ARGS*/(sdk)/**SCHEMA_ARGS*/ {
	function calculate(value1, value2) {
		return value1 + value2;
	}
	return {
		viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/[..]/**SCHEMA_VIEW_CONFIG_DIFF*/,
		viewModelConfigDiff: /**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/[..]/**SCHEMA_VIEW_MODEL_CONFIG_DIFF*/,
		modelConfigDiff: /**SCHEMA_MODEL_CONFIG_DIFF*/[..]/**SCHEMA_MODEL_CONFIG_DIFF*/,
		handlers: /**SCHEMA_HANDLERS*/[
			{
				request: "crt.HandleViewModelAttributeChangeRequest",
				handler: async (request, next) => {
					if (request.attributeName === "Field1" && !request.silent) {
						var sum = calculate(1, 2);
					}
					return next?.handle(request);
				}
			},
		 ]
	}

 

This approach doesn't work because every time i change the screen the function is removed automatically. 

 

Is there a way I can develop some core functions in a different module and call this module inside my "ApplicationFormSection_FormPage" freedom UI page?
Can you give an example for my case?

 

Best regards

Like 0

Like

1 comments

Hello,

A better approach is to use modules for page code. I try to add as little code to the page request handlers as possible and move all code to modules/classes. See https://customerfx.com/article/organizing-code-for-creatio-freedom-ui-pages-with-modules/

Ryan

Show all comments

Hi, 

 

I need to set a complex filter for a grid. How do I create a filter in JS and set it to a list in a page in freedom?

 

Best regards, 

 

Javier 

Like 0

Like

1 comments

Have you tried adding a crt.LoadDataRequest handler to dump request.dataSourceName out to the console to see if you can determine the name of the dataSourceName attriubute the list uses - and that it does fire that request? I assume it triggers this request when it get's it's data - similar to how lookups do, see https://customerfx.com/article/dynamically-filtering-a-lookup-on-a-creatio-freedom-ui-page/

Assuming it does and once you know the name of the dataSourceName it uses for the request you could add the conditions.

Alternatively, I believe you can add the filter conditions directly in the datasource in the viewModelConfigDiff, but you'd need to know the attribute name used in that scenario as well. Something like https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/front-end-development/freedom-ui/data-sources/data-processing#title-2438-3

Ryan

Show all comments