Hi all, 



Just wondering whether is there any way that we can run some javascript code / callback function upon completion of business process execution in client module?

 

If so, could you provide the sample code for reference?

 

Thank you very much.

Like 0

Like

2 comments

Hello,

 

If this is needed for versions lower than 8.0.6 (version when the LiveEditing feature was added out-of-the-box that will reload entity automatically in case changes to it were applied by a process) - you can always send a socket message to the client-side logic (like in the example but the message sending mechanism should be in the last script-task of the business process, on the client-side create a method that is triggered upon receiving the message)  or use an already-developed marketplace addon for it.

To elaborate more on what Oleg mentioned. There's no way to have a callback for when the process completes (the callback commented in your code is a callback for the completion of *starting* the process). A process can have things that wait for a period of time, so not really possible to wait for completion.

The approach to take is for the process to notify the client-code that it has completed by sending it a message. This article shows how to send the message: 

https://customerfx.com/article/how-to-refresh-a-page-from-a-process-in-…

If needed, this article shows how to receive the message in a Freedom UI page: 

https://customerfx.com/article/receiving-server-side-messages-in-a-crea…

However, if the page is Freedom UI, a better approach is to enable live data updates for the object so the refresh happens automatically when the data changes in the process. More about that here: 

https://customerfx.com/article/automatically-refreshing-a-creatio-freed…

From the code you posted, it looks like this is a classic page, so you'd have to go the first route for sending a message from the process to the client page.

Ryan

Show all comments

I changed the SQL Server Authentication settings to Windows Authentication Mode. But when I login to Creatio I get a Login Failed error.

What do I need to set in the Connection String?

 

Like 0

Like

1 comments

Hey guys,

 

I have a ComboBox that I would need to have a dynamic list of values. Is there a way in Freedom to make it so that the values do not come from a specific lookup dataset, and are only manually populated?

 

Lyle

Like 2

Like

1 comments

Hello!



Currently it's not possible to achieve using handlers or basic Freedom UI wizard. We've already created a suggestion to our R&D team to make it possible in future application versions and once it's done we will inform everyone in the Academy and Release notes. Thank you for helping us in making the app better!



Best regards,

Anton

Show all comments

Hello,

 

I have read through on locking fields using client module in Creatio. I have found that we can simply setting the "isModelItemEnabled" to true/false. And for more complex situation, we can create a function named "isModelItemEnabled" and write our code logic and return boolean value conditionally.

 

At the same time, I noticed that "isModelItemEnabled" is triggered before "onEntityInitialized" is triggered. This results to some of the values required to be used in "isModelItemEnabled" undefined.

 

Is there anyway to workaround this?

Like 0

Like

2 comments
Best reply

Rather than create a function, use an attribute. Then in the onEntityInitialized you can read any values and then set the attribute to true/false. See an example here: https://customerfx.com/article/completely-locking-a-page-via-code-inclu…

Also, just to point out, you mention locking a single field. If all you need is to lock a single field, there's no need to use IsModelItemsEnabled. Instead you can bind the visible for the field to an attribute and set as true/false as needed. See https://customerfx.com/article/how-to-enable-or-disable-a-field-on-a-pa…

Ryan

Rather than create a function, use an attribute. Then in the onEntityInitialized you can read any values and then set the attribute to true/false. See an example here: https://customerfx.com/article/completely-locking-a-page-via-code-inclu…

Also, just to point out, you mention locking a single field. If all you need is to lock a single field, there's no need to use IsModelItemsEnabled. Instead you can bind the visible for the field to an attribute and set as true/false as needed. See https://customerfx.com/article/how-to-enable-or-disable-a-field-on-a-pa…

Ryan

Okay, I will try it out. Thank you very much Ryan, best as always😄

Show all comments

Hello,

 

I have a page with the progress bar (cases) on Studio 8.1.0.6827. To simplify the explanation, let's say there are two stages based on a status field: New Request and Completed and I have business rules stating that the request description is required if the status is Completed. 



If the 'Save record on stage change' is off, when I click on the Completed bar, the description field becomes require and I cannot save without entering. But of 'Save record on stage change' is on the record is saved and the status changes to Completed even if the description was not entered. 



Any ideas on how to make it work where the 'Save record on stage change' is on but the business rules are applied, and the record is not saved if the required fields for that status are missing?



Thanks,

Jose

 

Like 1

Like

1 comments

Hello!

 

To provide you with an answer, we need to investigate it deeper. Please contact the Support Team directly via support@creatio.com and provide all these details.

 

Best regards, Mariia

Show all comments

please help me what is causing this error   

#docker logs b6f87859e923

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.

   at Terrasoft.EventSourcing.Configuration.EventStoreUtitities.GetEventSourcingConfiguration(Configuration configuration) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.EventSourcing/Configuration/EventStoreUtitities.cs:line 70

   at Terrasoft.WebHost.ApplicationModule.SetupEventStore(IServiceCollection services) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.WebHost/ApplicationModule.cs:line 227

   at Terrasoft.WebHost.ApplicationModule.Configure(IServiceCollection services) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.WebHost/ApplicationModule.cs:line 351

   at Terrasoft.Core.DI.AutofacContainerBuilder.Build() in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core.DI/AutofacContainerBuilder.cs:line 63

   at Terrasoft.Core.DI.ContainerBuilder.Build() in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core.DI/ContainerBuilder.cs:line 100

   at Terrasoft.Core.DI.ServiceProvider.ServiceProviderFactory.CreateServiceProvider(ContainerBuilder containerBuilder) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core.DI/ServiceProvider/ServiceProviderFactory.cs:line 23

   at Microsoft.Extensions.Hosting.Internal.ServiceFactoryAdapter`1.CreateServiceProvider(Object containerBuilder)

   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()

   at Microsoft.Extensions.Hosting.HostBuilder.Build()

   at Terrasoft.WebHost.Program.StartWebApplication(String[] args) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.WebHost/Program.cs:line 26

   at Terrasoft.WebHost.Program.<>c__DisplayClass2_0.b__0(StartOptions _) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.WebHost/Program.cs:line 62

   at CommandLine.ParserResultExtensions.MapResult[T1,T2,TResult](ParserResult`1 result, Func`2 parsedFunc1, Func`2 parsedFunc2, Func`2 notParsedFunc)

   at Terrasoft.WebHost.Program.Main(String[] args) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.WebHost/Program.cs:line 59

Like 1

Like

1 comments

Hello,

 

Please check your binary files and connection string.

 

To get started, run the application outside of Docker directly on Linux.

Show all comments

Hello,

 

I have a web service that generates a file. I need to attach that file to a record. I see there is an option to the Process File Component passing a File as parameter, but the Parameter is Expecting a IFileLocator. How can I use a script to create a IFileLocator from a full file path on Creatio Studio version 8.1? 

 

Thanks,

Jose

File attachments
Like 0

Like

2 comments
Best reply

Hello,

You should use a script task to work with files from the web service.

 

More details about the API file:



https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Hello,

You should use a script task to work with files from the web service.

 

More details about the API file:



https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Thanks Cherednichenko. Using the information provided I wrote the C# below to attach a generated file to a record.



public void AttachFile(string schemaName, Guid recordId, string fullFilePath) {

            /* Create a unique ID for the new file. */

            Guid fileId = Guid.NewGuid(); 

            /* Create a file locator for the new file. */

            var fileLocator= new EntityFileLocator("SysFile", fileId); 

            /* Get an IFile object for the new file. */ 

            IFile file = UserConnection.CreateFile(fileLocator); 

            /* There is no file metadata or file content in the available file storages. Specify the file name in the file metadata. */

            file.Name = (new System.IO.FileInfo(fullFilePath)).Name; 

            /* Set an attributes for the new file: */

            file.SetAttribute("RecordSchemaName", schemaName); 

            file.SetAttribute("RecordId", recordId);             

            /* Save the file metadata Do this BEFORE saving the content. */

            file.Save(); 

            using (var sourceStream = new FileStream( fullFilePath, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize: 4096, useAsync: true)) {

                file.Write(sourceStream, FileWriteOptions.SinglePart);            

            }

        }

Show all comments

Hi,

I have to provide Field Permission to a detail connected with  a Section in Freedom UI?

Can anyone knows how to do that?

Like 0

Like

3 comments

Hello,

 

Please describe your business idea in more detail so we could provide the best suitable solution for you.

Mira Dmitruk,

I have created  a Section and  provided them field level permission for Some roles. In that Section we have some details used. I have to give field level permission to  the fields of detail and this detail is used in  both Contact and Org Page and having different permission on field .So how I can give that? 

Hello,



You can configure column rights in the Object permissions section.



https://academy.creatio.com/docs/8.x/setup-and-administration/administr…

Show all comments

Dear colleagues,

 

I'm trying to found the system settings or whatever I need to bind the desktop configuration

 

Please Help

 

Thanks

Julio

Like 2

Like

4 comments

Hello Julio,

1) Choose the needed Desktop on the welcome screen in right bottom corner and click the settings button

2) Add the new Chart, click "Set up chart" and fill ALL required fields inside of modal window. Save the page.

3) Check in DB is record created successfully by this query (ChartWidget_r2b2wf3 - your widget name):

select  * from SysLocalizableValue
where [Key] like '%ChartWidget_r2b2wf3%'
order by ModifiedOn desc

4) To add image - open settings of the new Desktop (right top corner </> sign) and add "Images"

5) Open Advanced Settings Page, find the new Package with new Desktop, click "+ Add" -> Data. Here we have to create two connections:

5.1 Object - Desktop. BOUND DATA - name of Desktop

5.2 Object - SysLocalizableValue. BOUND DATA - Key  = "ChartWidget_r2b2wf3" (Widget name from Step 3), choose all of them

 

In the end you'll have new package with 3 files inside (1 Module and 2 Data)

P.S. If on the step 5 you'll receive any errors - do Flushall in Redis.

Thanks Anhelina and sorry, no-code?

Also, my instance is cloud, I have not access to db, is another way to bind this?

Julio Falcon (Cibernética),

It's a no-code method. You need DB only for step 3 but you can replace it by checking if "ChartWidget...." appeared in the Desktop settings list of strings (Advanced Settings -> enter the name of your new Desktop in search panel -> Left panel with different settings -> Open Localizable strings).

Show all comments

Hello Team, 

 

Is it possible to filter a lookup field in a detail in freedom UI ?

 

Thanks

Gargeyi.G

Like 1

Like

1 comments

Hello!

 

Unfortunately, there is still no opportunity as of now to filter lookup-fields in detail. We've registered it in our R&D team backlog for consideration and implementation in future application releases.



Best regards, 

Anton

Show all comments