Hi, 

I'd liket to create a script task in a business process, that given an email template, it executes it on a specific context. I mean, if the email template is based on a custom macro related with the Lead entity, I can pass the LeadID and the emailTemplateId to the script task, and the result is the text of the email template executed for that specific lead. 



Is there way to do that?



Thanks!

Ignacio 

Like 0

Like

4 comments

Hi Ignacio,

You can pass LeadId and the TemplateId as process parameters (create two Guid parameters in the process settings). Then you...MoreLess

Show all comments (3)

Hi,

I want to use function that are not included in System library/package.

I need to add the following in order to use the functions.

using System.Linq;

I tried adding this to the script but got an error message: " Feature 'using declarations' is not available in C# 7.3. Please use language version 8.0 or greater."

Is there a way to add the 'System.Linq' somewhere?

Thanks,

Chani

Like 0

Like

1 comments

Hi Chani,

This error means that either the .Net Framework version in your server where the app is hosted is not 4.7.2 and higher or .Net...MoreLess

Show all comments

In the previous versions of Creatio, In the User Task element there was the Script where you could implement the task logic, as shown in the image below

In which part of the User Task Source code , in the 7.18 Version of Creatio, should I implement the same logic ? 

Like 0

Like

3 comments

Hello Petrika,

Thank you for your question!

You can read more on this here:

https://academy.creatio.com/docs/user/bpm_tools/process_elements_refere…

Kind...MoreLess

Show all comments (2)

Hi,

I read collection of records using this script:

var entities = Get>("ReadDataUserTask2.ResultCompositeObjectList");

I want to loop through this list and set parameter with type contact to each object of the list.

The collection of records is a list of opportunityContact.

I tried converting each...MoreLess

Like 0

Like

2 comments

Hi Chani,

Here is a working example of two cases: set the string parameter value from the process that reads the collection and also modif...MoreLess

Show all comments (1)

Hi everyone,

I have created a script task to create new records from a csv.

I am trying to implement a method to search the db for a matching record and then update it (in case it exists).

The second part (the 'else' part, it's working fine) 

Does anybody know how to filter and search a DB table...MoreLess

Like 0

Like

4 comments

Hello,

I don't see anywhere in the code where you're saving the updates made to the entity in recordToUpd. Try adding the following to have...MoreLess

Show all comments (3)

Hi everyone, 

I am setting up a Business process in order to create new records in a custom section. The data is stored in a List returned by a method. 

How can I loop through the collection and create new entities based on the values I need?

Like 2

Like

1 comments

Problem solved by moving the code block inside of a function called in the method that loops through the collection. 

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...

MoreLess

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...MoreLess

Show all comments (1)

Hi All,

Can some one suggest a better approach to loop through multiple records and modify them. Please note that the trigger is coming from Signal (Record Added).

Basically, I am trying to add multiple records using Multi-select lookup detail built using LookupMultiAddMixin.

Reference - ...MoreLess

Like 0

Like

2 comments

Hi Anupama, 





 

One of the ways to create a loop in your process to work with the collection of records is  to create ...MoreLess

Show all comments (1)

Hi,

Let's say that I use a script task to get a request from a third party application and that request sends creatio a json with arrays.

What I need to do is to insert that data into some tables.

Can I pass the array to a collection parameter and then use it in my business process or do I need to insert the data via sql in the script task?

Thanks,

Raz

Like 0

Like

1 comments

Hi Raz, 

In fact, an array will work almost the same as a collection, so it doesn't make any sense to pass array into collection,&nbs...MoreLess

Show all comments

Hi,

I have a business process where I need to read the read element values in a script task.

When the read element is set to "read a collection of records" I'm using the following code:



var AccountsData = Get>("ReadDataUserTask12.ResultCompositeObjectList");

var AccountData = AccountsData.First();



var AccountAddress="";

AccountData.TryGetValue("Address", out AccountAddress);

What change do I need to do when the read element is set to "read the first record"?

Thanks,

Raz

Like 0

Like

3 comments

string name = string.Empty;
string email = string.Empty;
Guid RecordId = Guid.Empty;
 
/**
 * This approach should not be used...

MoreLess

Show all comments (2)