Hi,

I would like to know how can i trigger 'someMethod' by adding, editing or removing something in my detail.

 

Like 1

Like

4 comments

Dear Pedro,

Please find the options to trigger your custom method:

adding:

you can override the addRecord method of BaseGridDetailV2 to launch your custom method along with parent realization.

editing:

You can create a new attribute on the page schema, which will trigger method "methodName" based on the changes in indicated columns:

"Probability": {
    // Determination of the column dependency.
    "dependencies": [
      {
        // Depends on the "Stage" column.
        "columns": [ "Stage" ],
        // The name of the handler method for the "Stage" column change.
        // setProbabilityByStage() method is defined  in methods property
        // of schema object.
        "methodName": "setProbabilityByStage"
      }
    ]
  }

delete:

you can override the basic deleteRecords method on the detail schema, so to run your custom method after, or before parent realization of the method.

Regards,

Anastasia

Anastasia Botezat,

 Hi,

I've tried to override "deleteRecords" method on my detail schema page, and didn't work, I think its because of package dependencies but I'm not sure.

Pedro Pinheiro,

The "deleteRecords" method does work on the detail schema. Please debug the code, so to narrow down the possible cause. Here is an instruction on the client side debug:

https://academy.bpmonline.com/documents/technic-sdk/7-13/client-code-debugging

Regards,

Anastasia

Anastasia Botezat, I manage to fix my problem using "onDelete" instead of the "deleteRecords" method.

Thanks for your response.

Show all comments

Hi,

I have a EntityCollection and i would like to know how can i add Objects to that EntityCollection in my ScriptTask.

EntityCollection ec = Get("ProcessParameter1");

var entity;

ec.Add(entity);

Set("ProcessParameter1",ec);

Like 0

Like

1 comments

The Add method is correct. Additionally, I'd not recommend using a simple list instead. 

Show all comments

Hi , Can anyone help me in solving the errror while seeting up OAuth Authentication getting error in redirect Url as 

The server encountered an error processing the request. The exception message is 'Object reference not set to an instance of an object.' 

Here I am attaching the screenshot of configuration of OAuth login Page.

I am getting the exception after allowing permsission and after redirect Url . Should i need to add anything extra in redirect url or how will i get access token based on result of Redirect URL?

 

Thank You.

 

 

Like 0

Like

2 comments

Thibault Cros,

Hi, please contact our support team, we need more information to solve your problem - support@creatio.com

Show all comments

Hi,

I'm currently trying to obtain the "Id" from one of the contacts in my "Contact" table but I'm getting the same error:

Terrasoft.Common.ItemNotFoundException: Value "Id" was not found.

   at Terrasoft.Core.Entities.EntityColumnValueCollection.GetByName(String name)

   at Terrasoft.Core.Entities.Entity.InternalGetColumnValue(String valueName)

   at Terrasoft.Core.Entities.Entity.GetColumnValue(String valueName)

   at Terrasoft.Core.Process.UsrProcess2MethodsWrapper.ScriptTask1Execute(ProcessExecutingContext context)

   at Terrasoft.Core.Process.ProcessScriptTask.InternalExecute(ProcessExecutingContext context)

   at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context)

 

This is the script task i'm using for it:

var result = "";

var userConnection = Get("UserConnection");

    

EntitySchemaManager esqManager = userConnection.EntitySchemaManager;

var rootEntitySchema = esqManager.GetInstanceByName("Contact") as EntitySchema;

var esqResult = new EntitySchemaQuery(rootEntitySchema);

esqResult.AddColumn("Id");

esqResult.AddColumn("Name");

var entities = esqResult.GetEntityCollection(UserConnection);

result = entities[0].GetColumnValue("Id").ToString();



Set("ProcessSchemaParameter1", result);

return true;

Note: If i try to get the "Name" instead i dont get any error.

Like 0

Like

1 comments

Try this

var opportunityCarQuery = new EntitySchemaQuery(UserConnection.EntitySchemaManager,"OpportunityCar");
opportunityCarQuery.AddAllSchemaColumns();
 
var filter = opportunityCarQuery.CreateFilterWithParameters(FilterComparisonType.Equal, "Car", (Guid)carNodeId);
opportunityCarQuery.Filters.Add(filter);
 
var opportunityCarEntities = opportunityCarQuery.GetEntityCollection(UserConnection);
 
foreach (var opportunityCarEntity in opportunityCarEntities)
{
	var theId = opportunityCarEntity.GetTypedColumnValue<Guid>("Id");
}

 

Show all comments

Hi All , 

 

I am trying to create 'Account Category' Machine Learning Model in my demo version as mentioned in academy . (Ref Link : https://academy.bpmonline.com/documents/administration/7-14/how-create-lookup-value-prediction-model) . 

 

While doing the same steps  , when I am trying to train the model , I am getting an error 

 

Error message text[InternalServerError] Authentication service not available - Service Unavailable(ServiceUnavailable). Content: Request unsuccessful. Incapsula incident ID: 0-59084293183112519

I guess I am missing some webservice  integration ? Do I need to installl any plugin  ? Do I need to integrate BPM with some application  to start my ML model prediction ?

 

 

 

 

Like 0

Like

1 comments

Hi,

I recommend you to contact bpm'online support regarding this issue (support@bpmonline.com).

Best regards,

Angela

Show all comments



Hi I am trying to do the process in the link below:

 

https://academy.bpmonline.com/documents/technic-bpms/7-14/using-business-processes-automate-repeated-tasks-and-using-loops-process-flow

 

To start with this, can I somehow add a tag to all the records?

Like 0

Like

3 comments

Dear Aaykay,

Currently, there are no basic functionality to tag multiple records with tags at once. However, you may create a simple business process that would tag your records. Here is the example how to tag all cases http://prntscr.com/nsssa4

Best regards,

Dean

I'm trying to add a tag to multiple records as well.  How does your business process work if there's no common condition among the records you're tagging?  Can you tag all records that you've added to an adhoc folder, for instance? 

Dear Lisa,

Here is the option to tag the records in the static folder http://prntscr.com/ovyri4  As the result, the records in the folder http://prntscr.com/ovysha are tagged http://prntscr.com/ovysqu

Best regards,

Dean

 

Show all comments

Hi,

I want to run a process for all the records of a section where the business process reads two values of the respective record, modifies a field in that particular record and then does the same for every record in the section.

But I am not sure how to run the process for every single record. I am using Read data element and Reading the first record in the selection which gives the results for the last record that was created in the system but it does not run for every record in the section.

Could someone help?

Like 1

Like

5 comments

I think u can use 'flag' . U can create a new field in the table (not displayed on UI) , mark it 'N' as default for all the records and run the process in loop and update every time it is  N and set the particular record 'Y'  after processing . U can also set how many times the loop should run, default value is 100 u can update it a value according to the data size you are trying to work upon!!  I hope that helps . 

Shailey,

 I already have a lookup and I want to run the process based on the value of that lookup. Will that work or is it essential to have that flag? Can that lookup not act as the flag?

aaykay,

You can use record tag also. First put tag for all records which have specific value for the lookup as "to be processed", then on by one read all records with this tag, after processing, change the tag to some other tag say "processed"

Hi,

I am following as you suggested but the process only runs for the first record.

Shailey writes:

I think u can use 'flag' . U can create a new field in the table (not displayed on UI) , mark it 'N' as default for all the records and run the process in loop and update every time it is N and set the particular record 'Y' after processing

Show all comments

Hallo Please help

i already implementation sending data using BP from external :https://academy.bpmonline.com/documents/technic-sdk/7-13/how-run-bpmonl…

but when we call from other application is needed to login first

is any idea how to call web service business process from other apps ?

Like 0

Like

3 comments

call login, then get login cookies and then call the service with the cookies. 

please find the example in the article by the link below.

https://academy.bpmonline.com/documents/technic-sdk/7-13/executing-odata-queries-using-fiddler

Hi,

I'm also facing same issue; to call any custom web-service from web-service designer tool in Creatio it needs to pass Cookies. And to get these cookies, I need to login first.

And one more thing, if you're calling login service in Business Process you don't get Cookies. Is there any way to get cookies & pass them into further service calls?

@Eugene, this page is not available now: `Page not found | Creatio Academy`

Show all comments

Hi,

I am trying to build a process that will subtract 2 dates and record the difference in an integer field for all the records in the CRM. But for some reason, I can not get the result as required.

 

 

Like 0

Like

14 comments

Hello, 

Formula value uses standard C# syntax. In your case subtraction of 2 datetime fields gives you a TimeSpan, you can get the number of days in the TimeSpan by using Days property (TotalHours if you want to calculate difference in hours). 

So to get the difference between 2 date fields you can do the following formula: 

([#Date 1#] - [#Date 2#]).Days

You can assign this value to a business process parameter and them with modify data update the needed field with this parameter. 

Best regards,

Dennis

Dennis Hudson,

 Thanks for the reply. I am trying to build a business process to run every morning and that process should read the two dates and update field with the difference in those dates in days.

Can you guide with how to build such a process?

Currently it's as below and is really working. Just can't figure out how to read all the records and then update the field based on the current values of the record.

 

aaykay,

There are 2 options how you can do that: 

1) You can add a boolean column to your object (Something like Processed) and loop through all records, which have processed = false. After that you can read the first record in the selection with the mentioned filter, process date columns and after that set the Processed to true. You would need to loop until there is a record that has processed = false (count > 0). 

After all the mentioned operations you would need to set Processed of all records to false (one Modify data element). 

2) You can read all records as a collection, pass it to script task and operate with them in a script task. Here is some documentation on using collection: 

 https://community.bpmonline.com/questions/use-collection-parameter-script-task

https://community.bpmonline.com/questions/use-script-task-update-column-read-data-result-collection

Best regards, 

Dennis 

Dennis Hudson writes:

You can add a boolean column to your object (Something like Processed) and loop through all records, which have processed = false.

 

How do I loop through the records in the business process?

aaykay,

It should look similar to the screenshot below:

http://prntscr.com/nr79cf

Best regards,

Dennis

Dennis Hudson,

 When I run the process and put a constant number such as 07 or 50 or any other value, the business process updates the value in the specified field. But when I try to compute the value using the dates, it doesn't work. I am using the same formula as you mentioned earlier in the first comment (date2 - date1).Days.

Can you tell what might be going wrong?

aaykay,

Could you please specify what do you mean by 'doesn't work'? It gives you an error or the value is incorrect? In first case please give me an error message, in the second case - what dates do you input and value do you get when using the formula? Also, could you please send a screenshot of your formula and a part of process flow in which you use it? 

Dennis Hudson,

 Here are the screenshots:

1. Complete Process

2. Date formula for filled

 

3. Date formula if closed:

 

4. Final modification:

 

I am neither getting an error nor any other response. The integer field that I am trying to update shows value = 0, which I guess is the default value of field of type integer. 

Dennis Hudson,

 I omitted conditional flow and now I am getting the following output when I run the process for only status = Closed

The variable "DateDifference" now has value = -737,065

aaykay,

It happens because one of the date values is empty, if you fill in both date/time fields you should get a correct result. 

aaykay writes:

The variable "DateDifference" now has value = -737,065

Dennis Hudson,

Both the fields are filled. Please find the screenshot below.

aaykay,

Probably you are calculating those fields using the dates of one particular record that has one of the dates not filled in, and not for each record separately. Please write to the support@bpmonline.com for more detailed analysis. I've double checked the formula itself and it works fine, probably the issue is in the process flow.

Best regards,

Dennis  

Dennis Hudson,

 You can find the business process in the screenshots above. Even I think something is not upto the mark with process but only if I knew.

aaykay,

It's hard to determine what's wrong here from screenshots. I think it will be better to contact support. 

Show all comments

How do I parse a String using a formula or condition?  For example, if I want to do a comparison of the last three characters of a String, could I use [#Example String#].Right(3)=="-00"?  Is there a length function? Please provide the available functions.

Like 0

Like

1 comments

Dear Janine, 

You can perform all standard C# methods in formula (including all string operations). In your case you can use the following:

[#Example String#].Substring([#Example String#].Length - 3) == "-00"

or

[#Read data 1.First item of resulting collection.Full name#].EndsWith("-00")

Best regards,

Dennis

Show all comments