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

Hello,

 

I'm following the clio tutorial to install Creatio from CLI, but I'm getting the error below. Any ideas on what I'm missing?
 

Thanks,

Jose 
 

clio version '6.1.0.37'


[ERR] - The requested service 'Clio.Command.CreatioInstallCommand.InstallerCommand' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
 

Like 0

Like

1 comments

Hello,
 

The clio application is supported directly by the application developers on the github page.

We encourage you to consult our comprehensive documentation and engage with our GitHub community for assistance.


You can also ask your question and describe the error using this link.

 

https://github.com/Advance-Technologies-Foundation/clio/issues?q=is%3Ai…
 

Thank you.

Show all comments

Hello Creatio community,

 

I am using Creatio Studio Product (V.8.1.2.3941) and license "bpmonline self-service portal on-site subscription". 
I want to create a new section and page for a new object that I developed. This object will be available in Portal workplace. I created the portal screen using classic UI but it doesn't appear in the workplace setup for "External users". The only screen that Portal users can view is "Knowledge Base" screen which came with Creatio's product.

I read the Creatio documentation in "https://academy.creatio.com/docs/sites/academy_en/files/pdf/node/2088/C…" and it says that: "If you use the self-service portal, you can modify the existing portal sections but cannot add new sections.". How can I make my screen for my new created object available for portal users?

Like 0

Like

1 comments

Hello,

 

Unfortunately, according to the basic logic of our application, you cannot see any custom sections on the portal within the limitations of self-service portal license.
You can find more details in this article.

Show all comments

Hello,

 

I'm trying to implement a file storage that saves files on a network share instead of the database. I followed the instructions here:  API for file management | Creatio Academy but I'm getting a Cannot be null Parameter name: service error. 

Any help will be appreciated. 

Thanks,

Jose

 

Like 0

Like

1 comments

Good day,

Based on the screenshots, an empty value appears to be passed to a method with the “service” argument. Unfortunately, there's not enough information available to pinpoint the exact cause of the error at this time.
 

To further investigate, it would be necessary to debug and examine what the service returns in the browser console, identify what service it is, and review the function call stack.
 

These issues typically fall under the scope of a development consultation for a deeper investigation. 

If needed, you may want to discuss this with your manager to arrange a consultation.

Thank you!

Show all comments

Hello,



I would like create multiple buttons that call a business process. Due to the number of buttons in my page, I would like to create a single button click method. This method would receive a parameter that would tell it which button was called. The parameter would then determine which field would be read.



My button method should look something like this:

 onButtonClick: function(clickedButton){
				var recordId = this.get("Id");
                var readField = "Error"; //This value should change later, will show error otherwise
 
                switch(clickedButton){
                    case "Button1":
                        readField = this.get("Field1");
                        break;
                    case "Button2":
                        readField = this.get("Field2");
                        break;
                    /*More Cases
                    .
                    .
                    .
                    */
                   default:
                    console.log(readField);
                    break;
                }
 
                var config = {
                    sysProcessName: "UsrBpToCall",
                	parameters: {
						CurrentRecordId: recordId,
						ReadField: readField,
 
					}
				};
                ProcessModuleUtilities.executeProcess(config);
}

I assume the parameter would appear in the diff section, but I do not know how to implement this functionality.



I appreciate your help!

 

Kind Regards,

Firas



 

Like 1

Like

3 comments
Best reply

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Hello Firas,

If you add a tag to each button it will get passed as the fourth parameter to the click handler. 

For example:

{
	"operation": "insert",
	"parentName": "Detail",
	"propertyName": "tools",
	"name": "MyButton1",
	"values": {
		"itemType": Terrasoft.ViewItemType.BUTTON,
		"caption": "Send selected invoice",
		"click": {"bindTo": "onMyButtonClick"},
		"tag": "MyButton1"
	}
}

Then you can retrieve the tag in the click function handler like this: 

onMyButtonClick: function(p1, p2, p3, tag) {
    console.log(tag);
}

Ryan

Ryan Farley,



the solution works perfectly. Thank you.



I have a follow-up question if you do not mind. Does the tag being passed as the fourth argument mean that button click methods can take up to 4 arguments?  If that is the case how can one proceed if they were to pass more than one argument and populate p1 through p3? 



Thank you again, your Community responses and articles have been very helpful.



Firas

Hello,

 

Not sure about passing 4 arguments to the click event, I've been using the tag property only to pass the parameter needed. In your case you can bind the click-handler method to several buttons and specify different tags for it so the click-handler method could understand what to do according to the button tag.

Show all comments

I'm trying to Creating command Run process in command Line 

but i faced an issue the Keyword doesn't open to chooses Run process in studio module

Like 0

Like

1 comments

Hello,



Unfortunately, there is no way to run the process by the command line for now. 

 

We've registered it in our R&D team backlog for consideration and implementation in future application releases. Thank you for helping us to improve our product. 



Best regards,

Bogdan

Show all comments

I want to put button beside the group. Is the structure of groups and details different?

Like 0

Like

2 comments

I was only able to put the button inside the ControlGroup, but not in the "tools" container since ControlGroups have no "tools" container (like standard details). The result was as follows:

It seems that its impossible to put the button beside the group, but it's possible to put it inside the group using the code like below:

{
				"operation": "insert",
				"name": "ContactCategoriesControlGroup",
				"parentName": "GeneralInfoTab",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTROL_GROUP,
					"caption": {"bindTo": "Resources.Strings.ContactCategoriesControlGroupCaption"},
					"items": []
				},
				"index": 0
			},
			{
				"operation": "insert",
				"name": "ContactCategoriesControlGroupButton",
				"parentName": "ContactCategoriesControlGroup",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": {bindTo: "Resources.Strings.ContactCategoriesControlGroupButtonCaption"},
					"style": Terrasoft.controls.ButtonEnums.style.BLUE
				}
			},
			{
				"operation": "insert",
				"name": "ContactCategoriesControlGroupContainer",
				"parentName": "ContactCategoriesControlGroup",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.GRID_LAYOUT,
					"items": []
				}
			},
			{
				"operation": "insert",
				"name": "RelatedContact",
				"parentName": "ContactCategoriesControlGroupContainer",
				"propertyName": "items",
				"values": {
					"bindTo": "UsrContact",
					"layout": {
						"column": 0,
						"row": 0,
						"colSpan": 12
					}
				}
			},

So either use this approach or add a button to the "Actions" menu or to the top of the page.

 

Best regards,

Oscar

Oscar Dylan,

 

I think for group and detail have the same environment. but apparently not.

Thanks for the answer Oscar!

Show all comments

При попытке добавления блока с пользовательским кодом возникает ошибка

An attempt to add a script task causes an error

System.InvalidCastException: Specified cast is not valid.
   at Terrasoft.Core.Process.ProcessModel.GetParameterValue[T](FoundParameterData result)
   at Terrasoft.Core.Process.Process1MethodsWrapper.ScriptTask1Execute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessScriptTask.InternalExecute(ProcessExecutingContext context)
   at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

Сам код в блоке выглядит так: 

The code itself looks as following:

double result = Get<double>("amount") * Get<float>("rate") / Get<int>("division");
Set("result", result);
return true;

У меня нет опыта работы с BPMN, поэтому я не знаю, где именно я ошибся. Всё, что делают формулы - это запись данных из справочника в параметры процесса.

Заранее спасибо!

I'm totally new to BPMN so I have no idea where the error may be. The formulas only save lookup values into process parameters. 

Thanks in advance!

File attachments
Like 0

Like

2 comments

By the way, if there is a list of data type matches for decimal values (as I understood, float does not match all of them), I would really appreciate a link.

Кстати, если существует список соответствий типов данных для дробных значений (как я понял, float подходит не для всех), я был бы очень благодарен за ссылку.

Я нашёл необходимый тип данных, им оказался decimal. Вопрос можно закрыть

Вот ссылка на перечнь соответствующих типов:

Элемент процесса [Задание-сценарий] | Creatio Academy (terrasoft.ru)

I've found the necessary data type, it turned out to be decimal.

Above there is a link to a list of data type matches

Show all comments

hi all 

first of all i have 2 sections (Returns - Events) , and i have customized contacts section and by adding detail in it with these specs

"

- Add a new “Returns” tab.

- Add the following elements on the “Returns” tab

- The “Return requests” detail with the list of requests initiated by the current contact.

 - The “Total ticket return amount” metric

"

 

after that  i need to do this next detail 

 - Create a new “Tickets” detail without creating a new section. (done)

- The detail must contain the following fields:

 “Owner” (a contact). (done)

 “Ticket cost”.  (done)

 “Event”. (done)

“Return type”. (done)

 

 - The detail must be displayed on the page of return request and the user must be able to specify tickets from the current request on the detail.

- Set up the detail object: 

-The detail must inherit permissions from the return request.

- The records on the detail must be deleted automatically if the request is deleted

 

the last 4 points i don't know how i do them ? 

Help 

 

thanks

 

Like 1

Like

2 comments
Best reply

Ibrahim, 

If i understood you correctly: 



1. The detail must be displayed on the page of return request and the user must be able to specify tickets from the current request on the detail. 



Add Lookup field "Returns" (in my case it's going to be "Account") to the object of your detail. In [Data Source -> Lookup] select "Returns"



Then, when you're adding the detail to the page please set following settings: 



2.- Set up the detail object: 

-The detail must inherit permissions from the return request. 




After you've added lookup column "Returns", scroll down to "Access Rights" and select "Returns" in the field( see screenshot, in my case the column looks  up Account section, so it's " account")



3.
 - The records on the detail must be deleted automatically if the request is deleted



Select your lookup column (in my case it's Account) and select "Delete objects from current object with this value. 

That way, when the return is deleted, all the tickets associated to that return will also be deleted 





Best Regards,

Yurii. 

Ibrahim, 

If i understood you correctly: 



1. The detail must be displayed on the page of return request and the user must be able to specify tickets from the current request on the detail. 



Add Lookup field "Returns" (in my case it's going to be "Account") to the object of your detail. In [Data Source -> Lookup] select "Returns"



Then, when you're adding the detail to the page please set following settings: 



2.- Set up the detail object: 

-The detail must inherit permissions from the return request. 




After you've added lookup column "Returns", scroll down to "Access Rights" and select "Returns" in the field( see screenshot, in my case the column looks  up Account section, so it's " account")



3.
 - The records on the detail must be deleted automatically if the request is deleted



Select your lookup column (in my case it's Account) and select "Delete objects from current object with this value. 

That way, when the return is deleted, all the tickets associated to that return will also be deleted 





Best Regards,

Yurii. 

Yurii Sokil,

thank you 

Show all comments

I'm trying to create virtual column lookup. But, the result is the lookup view by default open with Selection Window, in other side I want to change to list.

 

How to implement this functionality?

Like 0

Like

4 comments
Best reply

Hi Ahmad,

You can add "isSimpleLookup" to the virtual lookup attribute to make it a drop-down instead of a popup lookup window.

Example:

"TypeLookup": {
    dataValueType: Terrasoft.DataValueType.LOOKUP,
    isSimpleLookup: true,
    referenceSchemaName: "AccountType"
}

Ryan

Hi Ahmad,

 

please refer to this link where the same question is explained

 

https://community.creatio.com/questions/convert-comboboxedit-gridlist-o…

 

P.S. It will be much easier to create lookups and choose the required view in Lookup Settings. Please check the example below :

 

 

Best Regards, 

 

Bogdan L.

 

Hi Ahmad,

You can add "isSimpleLookup" to the virtual lookup attribute to make it a drop-down instead of a popup lookup window.

Example:

"TypeLookup": {
    dataValueType: Terrasoft.DataValueType.LOOKUP,
    isSimpleLookup: true,
    referenceSchemaName: "AccountType"
}

Ryan

Ryan Farley,

Thank you Ryan, this is what I was looking for.

Bogdan Lesyk,

Hello Bogdan, I actually created a virtual column. So i can't change the configuration through page setup.

Show all comments