we tried the below code for file conversion, after execution we get to see the below error message in script task.

please find the code below

//var fileId = new Guid(aspPage.CustomData["ReportFileId"].ToString());

var fileId=Get("fileId");

var userConnection=Get("UserConnection");   

           

var entitySchemaManager = userConnection.EntitySchemaManager;

var entitySchemaQuery = new EntitySchemaQuery(entitySchemaManager, "UsrCandidateEntryFile");

var fileDataColumnName = entitySchemaQuery.AddColumn("Data").Name;

var fileNameColumnName = entitySchemaQuery.AddColumn("Name").Name;

entitySchemaQuery.Filters.Add(entitySchemaQuery.CreateFilterWithParameters(FilterComparisonType.Equal,

    entitySchemaQuery.RootSchema.GetPrimaryColumnName(), fileId));

var collection = entitySchemaQuery.GetEntityCollection(userConnection);

var currentRow = collection[0];

var data = currentRow.GetBytesValue(fileDataColumnName) as byte[];

var base64 = Convert.ToBase64String(data);

Set("Base64String",base64);   

if (collection.Count == 0) {

    return true;

}

return true;

Like 0

Like

1 comments

Hi everyone.

I need to track or get if an email sent from bpm to an account, is opened, to fill a field in bpm (The filled will be the date that was opened).

The email is sent by a step in a stage.

(the receiver may not have an user in the system).

I would like to know if there is a way to do it?. And if you could give an example or explain how.

Like 0

Like

1 comments

Dear Ezequiel,

This is quite complex development process. First of all you have to add a tracking links to your emails that will trigger and give the response once an email is opened.

Secondly, you will need to develop a web-service that will aggregate a response and record it with a timestamp in bpmonline. As far as I know there is no ready solution for it and it has to be implemented.

As a workaround for it,we can offer you to use the the marketing module of the application that has quite similar functionality available out of the box and there are no major adjustments required.

Best regards,

Dean

Show all comments

Is it possible to reload data on an edit page without reloading the whole page? Let's say I have a button that calls a back-end method that calculates something and updates one of object's field. I would like to see the new value without having to refresh the page.

Like 0

Like

2 comments

Dear Carlos, 

Thank you for your question.



Since the logic is executed on the back-end, the page has to  be reload for changes to display. However, there is an option to reload the data on the page automatically by adding a method 'this.reloadEntity();'  to your custom button handler method. As a result the page will be reloaded automatically by the system and changes will appear. 

Best regards, 

Dean

Dean Parrett,

Ok, thank you. I think that's what I was looking for.

Show all comments

I have a pre-configured page that is logically connected with an object and I would like to display there a feed just as it appears on its edit page. Is it possible?

Like 0

Like

3 comments

Dear Carlos,

If a page you are displaying contains Feed it will be displayed on pre-configured element. 

Angela Reyes,

How to add that on a new page though?

Carlos Zaldivar Batista,

Feed tab can be inspected in BaseModulePageV2 from ESN package. To add Feed you'll need to transfer in you page schema diff: http://prntscr.com/lei5bx, add LocalizableStrings: http://prntscr.com/lei5ip and add all methods responsible for Feed tab functionality, like loadESNFeed, getSocialFeedSandboxId, initTabs, messages (http://prntscr.com/lei64z

) and ect. 

Show all comments

Hi Team,

I have added a button to create child custom section record from an opportunity. After saving the child record it is navigating back to Opportunity but I want to Stay back in the child since I have to do other actions in the child. Below is the button code. Please suggest if you have any idea on how to achieve my goal.

Thanks,

Venkat.

Button Code:

================================

methods: {

            onNewQuoteClick: function() {

                    var now = new Date();

                    now.setMonth(now.getMonth() + 1);

                    this.openCardInChain({

                        schemaName: "UsrChildPage",

                        operation: Terrasoft.ConfigurationEnums.CardOperation.ADD,

                        moduleId: this.sandbox.id + "_CardModule",

                        defaultValues: [{

                            name: ["UsrOppLookup"],

                            value: [this.get("Id")]

                        },

                        {

                            name: ["UsrName"],

                            value: ["Child For " + this.get("Title")]

                        },

                        {

                            name: ["UsrAccount"],

                            value: [this.get("UsrQuoteAccount").value]

                        },

                        {

                            name: ["UsrExpiredate"],

                            value: [now]

                        }

                        ]

                        

                    });

                    this.save({ isSilent: true });

                }

        }

 

Like 0

Like

4 comments
Best reply

Tetiana Markova,

Thanks a lot. That worked like a gem.. Thanks Again..

Hello,

I suppose, the same issue was discussed in this topic - https://community.bpmonline.com/questions/how-stop-redirection-new-orde…

You need to override 'onSaveButtonClick' method and set 'isSilent' parameter in order to stay on the page after save:

onSaveButtonClick: function() {

   if (this.get("IsProcessMode")) {

      this.save({ isSilent: true });

   } else {

      this.save();

   }

}

Tetiana Markova,

Hi Tetiana,

Thanks for the response. I have override the Save button in my child page as shown below but not successful. Can you please check and let me know what mistake I am doing?

Thanks,

Venkat.

 

Code:

==================================

{

                "operation": "insert",

                "name": "Save",

                "values": {

                    "itemType": 5,

                    "style": "green",

                    "caption": {

                        "bindTo": "Save"

                    },

                    "click": {

                        "bindTo": "onSaveButtonClick"

                    },

                    "enabled": {

                        "bindTo": "canEntityBeOperated"

                    },

                    "classes": {

                        "textClass": [

                            "actions-button-margin-right"

                        ]

                    }

                },

                "parentName": "LeftContainer",

                "propertyName": "items",

                "index": 5

            }

==============================

onSaveButtonClick: function() {

                 if (this.get("IsProcessMode")) {

                     this.save({ isSilent: true });

                 }

                 else{

                     this.save();

                 }

            }

Let's try another approach by overriding save() method for your child edit page:

  methods: {

            save: function(config) {

                if (config) {

                    config.isSilent = true;

                }

                else {

                    config = {

                        isSilent: true

                    };

                }

                this.callParent([config]);

            }

        },

Tetiana Markova,

Thanks a lot. That worked like a gem.. Thanks Again..

Show all comments

I'm creating a process that reads data and then needs to update a text column on that data by appending some new text to the existing string. I can read the data fine but the script task throws a null reference exception. Here is the simplified version of my script:

var programs = Get("ReadDataUserTask1.ResultEntityCollection");

foreach(var program in programs) {
    program.SetColumnValue("Campaign Flags", "Test");
}

return true;

The programs is null when I run the process.

Like 0

Like

7 comments

Dear Scott,

Try another approach to overcome the issue. Please read the collection of the Read Data in the following way: 

 var entities = Get<ICompositeObjectList<ICompositeObject>>("ReadDataUserTask1.ResultCompositeObjectList");

Afterwards proceed further with collection result.

Regards,

Anastasia

Anastasia Botezat,

using trying the above script, when I convert the list to string by doing:

entities.ToString());

I get  - Terrasoft.Common.CompositeObjectList`1[Terrasoft.Common.CompositeObject] (looks like the type and not the value)

Can you help?

Chani Karel,

 

There is no need to cast object to string since you can get the value from some column of the object using GetCompositeObjectColumnValue (in my case I was reading the "Full name" column value from the collection of contacts):

 

string name = GetCompositeObjectColumnValue&lt;string&gt;(contacts, "Name");

and then process the value according to your needs.

 

Best regards,

Oscar

Hi Chani Karel,

I think there are 2 things in your scripts:

1. You ReadDataUserTask1 result could be empty.

var programs = Get&lt;EntityCollection&gt;("ReadDataUserTask1.ResultEntityCollection");

Therefore, before the "foreach Loop", you really need to check if the programs is null or not. Otherwise, you might get the exception as you mentioned.

 

2. Please use the column code instead of column title to set value.

For example, in Contact there is column with code "JobTitle" and title "Full job title". If you need to set the value, you need to use the code "JobTitle".

 

regards,

 

Cheng Gong

Oscar Dylan,

using the tostring method was just to understand why I don't get the values as needed. 

What I need to do is this:

I get a list of 'contact in opportunity' by the read collection of records element. I need to get the contact as lookup  value and not as string (the Id and not name) in order to set parameters with the contacts and send email to them.

How do I do it?

Thank you.

Cheng Gong,

using the tostring method was just to understand why I don't get the values as needed. 

What I need to do is this:

I get a list of 'contact in opportunity' by the read collection of records element. I need to get the contact as lookup  value and not as string (the Id and not name) in order to set parameters with the contacts and send email to them.

How do I do it?

Thank you.

Chani Karel,

How did you end up solving this?

 

Kind regards,

Yosef

Show all comments

Hi;

I create new Section entity by wizard;

The notes field on page doesn't keep the values after save.

Anyone can help

Regards

Tomek

Like 0

Like

1 comments

Dear Tomek,

Can you please specify how did you add this field on a page? And are you referring to attachments and notes detail or you added HTML box? Can you share a screenshot of this field? 

Show all comments

Is it possible for race conditions to appear when using signals? For example, let's say I have a process A that creates an object. There's also a process B that gets called when object of this type is created and it sets the object status to some value. In its next step process A checks this status.

Will all those actions always appear in the same order or is it possible that sometimes process B will change the object status before the check in the process A and sometimes it will do that after the check?

Like 0

Like

2 comments

Dear Carlos,

Usually, task like those are solved with the help of timers and/or subprocesses. You can add wait timer after process A creating an object and after process B modifies it so the processes will have time to complete. You can aslo test the time it takes for both process to complete to adjust timers accordingly. If the processes check/modify the same object but they are not connected it is completely possible that process A might check the status before it was changed by B.

Ok, thank you for the information.

Show all comments

Is it possible to force update of database tables with records from data packages? I would like make my database to reflect what is in data packages for tables that have data packages associated with them.

Like 0

Like

5 comments

Set instalation type = Update existing and check column [Forced update]

[Update existing] - when updating a package, only those object columns that are marked with [Required for update] ([Forced update]) in the [Columns] group will be updated. This type of installation is used, for example, when delivering hotfix updates!

And how can I automatically delete records that are not in the data package? Let's say I have a list of car models and this list has changed completely. I delete old records and add new ones on my development environment. Then I update my data package that stores car models. Now I want my changes to appear in the testing environments but while the new records are added as expected, the old car models are not deleted.

For these purposes, create a sql script and set the database type and installation type. (For examples see DeleteAllSettingsFolderMSSql from UIv2 in configuration tab Sql scripts)

Grigoriy,

Hi Grigoriy,

Is it possible for the sql script to run automatically? or do I need to run it?

Thanks,

Raz

Hello Raz,

 

If I understood your question correctly, we'd suggest running the needed scripts manually but also you can try to create SQL triggers for starting those scripts automatically.

 

Best regards,

Roman

Show all comments

how can I write data received

from an external webservice in

the contact table

using a business process?

 

 

Like 0

Like

4 comments

Hello Stefano,

For such purpose, you need to create a script task. In the Script task you need to get the response from your web-service, deserialize it and set the deserialized values as a business process parameters. After that you will be able to modify your Contact object with the business process parameters.

Please, see an example how you can obtain a response from the web-service and deserialize it in the Script task:

string response = Get<string>("WebService1.Response");

var resCollection = System.Web.Helpers.Json.Decode(response);

Please, note that you need to add the System.Web.Helpers library to the External Assemblies of your package in the Configuration.

Hello Tetiana,

Thank you for your response.

The sample above (you can find it at https://academy.bpmonline.com/documents/technic-bpms/7-12/call-web-serv… a business process that uses "Call web service" action but it's not documented how the "Log in to bpm'online" and "Insert contact bpm'online" is done.

Do you know how to make it?

I believe the mentioned article is not about the business-process "Get contacts from third-party database". It is just an example how to work with the 'Call web-service' element. Therefore, it doesn't cover all process elements.

If you need to get the contacts from the external web-service, the algorithm is the next:

- Create a web-service and specify all its methods and response paramaters. You can use this guide as an example - https://academy.bpmonline.com/documents/technic-bpms/7-12/calling-web-s…

- Create a business process with [Call web-service] element

- Create a script task to parse your response data. 

As an alternative, you can specify all your web-service response parameters, following this guide - https://academy.bpmonline.com/documents/technic-bpms/7-12/setting-parsi…

- Than you need to insert the parsed response parameters to the contact table via [Add data] business process element. Please, see the 'Working with web service response' part of the guide (https://academy.bpmonline.com/documents/technic-bpms/7-12/call-web-serv…). In your case, you need to use [Add data] element instead of the [Pre-configured page]

Hi Tetiana

I found the solution.

  • Create a web-service and specify all its methods and response paramaters:  I captured with "fiddler tool" the json request and the json response for Login to Bpm-online and the json request and the json response for Insert a new contact
  •  Create a business process with [Call web-service] element: using quick setup and the json mentioned above I configured the [Call web-service] element
Show all comments