Is it possible to specify date formatting when using email templates?

Like 0

Like

1 comments

Dear Carlos,

As for now there is no such functionality, but I'll inform our R&D team about this issue and suggest them to implement it. Thank you for helping us to make our application better. As a workaround you can use either BP to modify your templarte accordingly to your business task or add macro handler into the template: https://academy.bpmonline.com/documents/technic-sdk/7-13/adding-macro-h…

Show all comments

Hi;

I check value of field (attribute) on page in onRender method

sometime it work correctly and sometime it show error that this.get("usrStatus") is undifined

here is my code,

            onRender: function() {

                var that = this;

                setTimeout(function() {

                    if (that.get("UsrStatus").value === "22a42a46-1f02-46d4-8a1b-e947631a0671") {

                        that.set("justClosed", true);

                        that.sandbox.publish("UnblockManClosed");

                    }

                });

                this.callParent(arguments);

            }

 

Regards

Tomek

Like 0

Like

4 comments

Try putting the code in onEntityInitialized instead of onRender. With your setTimeout it likely sometimes gets the timing right that the entity is available and other times not. If you put the code in onEntityInitialized the object values will definitely be available.

Ryan Farley,

Thank Ryan;

That may sold muy problem

Maybe have you anny idea when this is on Preconfigured page not base on any entity?

 

Regards

Tomek

Hello Tomasz,

I'm not completely sure, but it looks like it would work the same on a preconfigured page. Looking at PreconfiguredPageV2 it does also define onEntityInitialized. PreconfiguredPage also does inherit BasePageV2 (which inherits BaseEntityPage), so I would assume it would work the same for the preconfigured page.

Ryan

Dear Tomasz,

As advised above by Ryan, please transfer your code to basic onEntityInitialized method. At the moment of its execution page model is already retrieved. onEntityInitialized method is present on PreconfiguredPageV2, since it inherits from BasePageV2, which has the method realization.

If you will have any further questions, please let us know.

Regards,

Anastasia

Show all comments

Hi Community,

This code below gets the Guid of the current user in client side code

Terrasoft.SysValue.CURRENT_USER.value

How about in script task, using C# code what is its equivalent?

 

 

Like 0

Like

4 comments

In a script task you have access to UserConnection. This exposes a  CurrentUser property (which provides an object of type SysUserInfo). 

var currentUser = UserConnection.CurrentUser;
var userId = currentUser.Id;
var userName = currentUser.Name;

BTW If this was code in a source code schema/configuration service, you'd need to get the UserConnection via the AppConnection first:

var appConnection = HttpContext.Current.Application["AppConnection"] as AppConnection;
var currentUser = appConnection.SystemUserConnection.CurrentUser;

 

Ryan Farley,

Thanks Ryan,

Is there any documentation about CurrentUser. I want to know everything about its properties and attributes for future use.

Thanks.

Fulgen Ninofranco,

I don't know of any documentation, it is in Terrasoft.Core.dll, however, the SysUserInfo object inherits from the SysAdminUnit object. This object you can see in the configuration. Search for SysAdminUnit in the configuration and you'll see what is available in the SysUserInfo. The SysUserInfo object itself only adds 5 additional properties for TimeZone, PageRowsCounr, Culture, ClientIP, and DateTimeFormatCode.

Dear Fulgen,

Please use the example mentioned by Ryan, it covers the way you work with UserConnection in Script Task. 

var currentUser = UserConnection.CurrentUser;

For more information on all .Net classes used in the system please see this article:

https://academy.bpmonline.com/api/netcoreapi/7.13.0/index.html#GeneralS…

Also, as for examples of UserConnection usage in web services you can check the examples here:

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-create-cus…

 Regards,

Anastasia

Show all comments

Is it possible to create a printable for an entity without a section? I looked into source code of ReportService and it seems it should be possible to generate documents for this kind of entities (either by C# or by calling the service from JavaScript) but I'm unable to define the printable, because the wizard allows me to choose only sections as the template source of data.

What I'm doing now, is creating dummy sections where I copy data from the my normal entities, just for the purpose of defining a printable. I hope there's a better way.

Like 0

Like

1 comments

Dear Carlos,

Indeed, you can create a printable without a section and call it by custom development. However, there is no way to add such printable without a section to the printable lookup. 

Therefore, in order to use printable lookup functionality you need to create a section based on the object. You may hide it from all workplaces, so it won't be in the view, but just exist in the configuration for printable purposes. 

Nevertheless, we are grateful for your comment, as it is a idea for the product improvement, which will be transferred to our developers team for their revision.

Regards, 

Anastasia

Show all comments

Hi Team,

I am implementing the approval in my custom section with three stages in a case as attached. User was able to edit the record field when the approval is in progress. I have made the approval step as required in the stage but no success. Please suggest. I have tried adding a new approval record and approval task in business process and linked the business process in my stage but no success. 

Thanks,

Venkat.

File attachments
Like 0

Like

1 comments

Hello.



The approval itself does not lock the record, it is just a step needed to go to the next stage. Your idea with the access rights element would be the best way to achieve the desired outcome. You can add a change access rights element along with the approval element (you can make both required for the same stage), that will remove edit access rights from all users except from the owner, for example. Then you can add another change access rights element, that will distribute the edit rights to the users, once the approval is received.

 

Best regards,

Matt

Show all comments

Hi community!

How are you?

I have a web service configured which returns an object collection among others parameters

Through a business process, I want to process the response of said web service.

For this, I have configured a parameter in the process..







To which, I assign the collection result of the WS as follows:

 


 

Then, in the script, I try to read the collection parameter in a variable..



The process compiles successfully, but when executing it, I get the following error

I tried several alternatives, like



var entities = Get>("Tickets");



or another data type but I keep getting the same error

Any idea or example to process a collection of a web service?

 

(My BPM version is 7.13)

I attached the images to be seen more clearly

Thanks you!



King Regards

 

Ezequiel

Like 0

Like

9 comments

Dear Ezequiel,

Please see the step-by-step instruction on how to correctly retrieve and work with web service collection result in business process Script Task. 



1. To start with, here are my test web service integration settings:

Image.png



Image.png





2. In the business process we will be retrieving needed data directly from the Web Service element. 

The main idea here is to address the results collection via "_Out" suffix. Please pay attention, that we apply suffix to the method's parameter and each variable taken from the collection.









Image.png

 Regards,

Anastasia

AAlonso.29,

Hello.

Please find all of the images via the links below:

https://prnt.sc/m5x10n

https://prnt.sc/m5x0wj

https://prnt.sc/m5x2b5

https://prnt.sc/m5x2me

Best regards,

Matt

Hello Matt

I configured exactly the web service and the business process as in you screenshots but the following statement (My custom prefix is Rv instead of Usr)

var entities = Get<ICompositeObjectList<ICompositeObject>>("WebService1.RvArray_Out");

returns a null variable (entities is null).

The web service response is OK (I tried to show it on a page).

I also tried using this syntax:

var entities = Get<EntityCollection>("WebService1.RvArray_Out");

but the entities variable is still null.

Can you tell me what's wrong with my code?

Thank you very much

 

Massimiliano Mazzacurati,

It seems that webservice simply is not returning the desired array. To confident about this, you may create some test queries to the webservice in postman or fiddler (utilities for web development).  



However, you always can call the webservice in script task via c# code and then process the response from the webservice as you wish.

https://stackoverflow.com/questions/4015324/how-to-make-http-post-web-request



Best regards,

Alex

Hi,

I have a web service from which i fetching data like name, mobile number, email address. Response that is returned is an array. Now want to fetch email address and sent email to all the customers. I have attached the process diagram and task script :

Below is the script for fetching data from web service response: where can see console logs in creatio like values of name and email that have printed in the console.Writeline.

 

UsrParameter is the code of the response parameters. 

When i am sending simple response parameters like name and email script works without any error but when i send array as response i am getting error.

 

var entities = Get<ICompositeObjectList<ICompositeObject>>("WebService1.UsrParameter_Out");

foreach(var entity in entities){

    

     string name="";

     string email="";

     var isnameexist = entity.TryGetValue<string>("UsrName_Out", out name);

      throw new Exception(name);

    

     var isemailexist = entity.TryGetValue<string>("UsrEmail_Out", out email);

    throw new Exception(email);

    

     Console.WriteLine("name "+name);

      Console.WriteLine("email "+email);

     Console.WriteLine("isnameexist "+isnameexist);

      Console.WriteLine("isemailexist "+isemailexist);

    

}

return true;

 

Please help me solve this issue. I am new to creatio. I am struggling with script task element.

 

Thanks 

Nitin

Nitin,

 

Hello,

 

Try composing your approach with the one developed in the "Prepare Recipient Emails" script-task of the base "Send email to case group" business process:

The idea here is to form a list of recipients from a collection of the ESQ request result. You need to use your collection and develop a logic similar to the one developed in the script task.

 

Best regards,

Oscar

Oscar Dylan,

 

Thank you Oscar for reply 

Massimiliano Mazzacurati,

 

When we are fetching responses  from a web service,What is this "WebService1" in the double quotes? From where i can map this value?

Nitin,



here in advanced mode 

you can see the code for webservice and its parameters on 2nd tab

Show all comments

Do you know how to create macros in BPM'online 7.12? I found this guide for 7.13: https://academy.bpmonline.com/documents/technic-sdk/7-13/adding-macro-handler-email-template but in my case the interface IMacrosInvokable could not be found.

Like 0

Like

4 comments

Dear Carlos,

To get the IMacrosInvokable interface, you have to add it first, by adding source code to the schema of your development package. Please, refer to the paragraph 'Creating the class which implements the IMacrosInvokable interface' of the guide. 

Apart from that you can use your own templates that are quite convenient as well. More details are in this article:

https://academy.bpmonline.com/documents/administration/7-13/how-create-…

Regards,

Dean

 

Dean Parrett,

The problem is that the interface IMacrosInvokable can not be found, so my source code doesn't compile.

Dear Carlos,

If you receive the error 'IMacrosInvokable' could not be found' that means that most likely you are not using the Service application. This guide and functionality are developed for Service applications only and the interface IMacrosInvokable' is developed in CaseService package of the IMacrosInvokable schema. It might me the reason for this error. Our R&D team is working on implementation of this functionality in different products, so you may expect it in the upcoming versions of the application.

Best regards,

Dean

Dean Parrett,

Ok, thank you.

Show all comments

I need to add a calculated hyperlink inside the body of a [Send email] process element (for example the link to the page of an account: when the user clicks on the link inside the email, then the browser opens the account page)

I didn't find the way to do it using custom email and email templates as well.

How can I do it?

Like 1

Like

8 comments

Hello.

You can do it with the help of macros. First of all you need to create a template and select a desired macro source and then you can copy a part of the link without the record id like this and add a macro at the end of the link like this: http://test.bpmonline.com/0/Nui/ViewModule.aspx#CardModuleV2/AccountPag…]

That can be done without any additional configuration, you can also create an html link if you want (in order to hide the full link you will have to develop an html template block)

You can read more below:

https://academy.bpmonline.com/documents/administration/7-13/how-create-…

Best regards,

Matt

Thank's Matt, you solved my question

Could you please share the steps , I am unable to open this link . I also want to add a customised url link in my email body. 

 

Thanks

 

Shailey,

Hello,

Here is an example how I did it using "Accounts" section as an example (please refer to this screenshot http://prntscr.com/njtzkv). Please also note that I used account "Our company" as an example, but you can bind this process to a section if needed. Also please note that you need to build separate processes for different objects of the application. And here is my model of this process:

1) Create a "String" parameter in process parameters (you can read about it here https://academy.bpmonline.com/documents/technic-bpms/7-13/process-parameters). This parameter will be used to convert the ID of the record from "Accounts" object to "String" data type.

2) Add "Read data" element that will read all data from the object, from which the process should start (in my example it is "Accounts")

3) Create formula that will set the value of "http://o-drobina:8001/0/Nui/ViewModule.aspx#CardModuleV2/AccountPageV2/edit/"+[#Read data 1.First item of resulting collection.Id#].ToString()" for "Parameter 1" parameter. This value is formed as:

http://o-drobina:8001/0/Nui/ViewModule.aspx#CardModuleV2/AccountPageV2/edit/ ( which is standard link to the edit page of Account section record) + [#Read data 1.First item of resulting collection.Id#].ToString() (which is conversion of UID value read from "Read data" element to string). This conversion is needed, because the link should be text completely. And it will be used in "Send email" element in the next step.

4) In the "Send email" element please specify all needed parameters (To, from, CC etc.) and the email body should look like this http://prntscr.com/njtxoq.

As a result you will receive an email with link which can be used to redirect users to the needed record in the application http://prntscr.com/njtydz and http://prntscr.com/njtynp.

Best regards,

Oscar

Oscar Dylan,

Hi,

I tried doing what you suggested but get the link as a string and not as hyperlink.

How do I make it be a link?

 

I ended up creating a template message and there used the Link to object feature. (There you can also hind the full text and put different parameter for the view)

Hi,

Would still like to know how to get this work through the custom email and not template.

Thanks.

Anyone?

Show all comments

Is it possible to force users to use a certain column layout? I know I can set it up for everyone with a supervisor account but they still can change it afterwards.

Like 0

Like

3 comments

Dear Carlos,

you can use business rule which will fill and lock a certain field on a page if that is what you need. 

Angela Reyes,

I don't think that's it. I'm talking about column layout on details or sections and their sorting order.

Carlos Zaldivar Batista,

As for now there is no such functionality, but I'll submit a request to R&D team about this issue and suggest them to implement it. As a workaround you can inspect "column setup" button on a detail and add access right check or hide it for certain roles. 

Show all comments

Is it possible to create a notification for one "supervisor" type user when one of the processes fails (no matter who started it)? As it is now, failures are shown in the process log but you don't get informed that you should look into it.

Like 0

Like

4 comments

Dear Carlos,



Unfortunately, there are no such pre-configured notifications, however you can install an application from our marketplace that will add a new detail 'Process' to the system, which will be tracking the statuses of your business processes.

After that you can make up a dashboard that will reflect the status of your business process by connecting it with that detail. Another option - you can create a new business process that will track this detail by 'failed' status.

For example, once your business process is failed you will receive an email notification. 

Here is the link to the application: 

https://marketplace.bpmonline.com/app/processes-log-view-bpmonline

Best regards,

Dean

The idea of creating a process that checks process log periodically seems ok, but it would mean that users are not notified about errors immediately. I tried to create a process that waits for SysProcessLog record creation or change of statuses to Error but it hasn't worked. It seems that inserts or updates to SysProcessLog table don't produce signals. Is there a workaround for that?

Dear Carlos,

Unfortunately, as for now the SysProcessLog table doesn't give the signal. The only option is to use the MarketPlace application a solution. Our system logic is still being developed and improved and most likely this functionality will be implemented in the upcoming system updates.

Best regards,

Dean

Dean Parrett,

Ok, thank you for the info.

Show all comments