Hi!

How are you?

I hope you can help me!

How can I get the role of the user loggued in?

 

I need to get the user's role to be based on this, set fields like readonly, or hide some tab.

Thanks!

 

Regards,

Ezequiel

Like 0

Like

2 comments

Hello!



You can use the following global variable

var currentUserId = Terrasoft.SysValue.CURRENT_USER.value;

Following that, build ESQ Select query.

You can find an example in the following article: 

https://academy.bpmonline.com/documents/technic-sdk/7-11/getting-query-…

Finally, Select from SysUser or SysAdminUnitInRole to obtain roles.

Hello,

Is that Select query from SysAdminUnitInRole still available ? I got an error :

ErrorCode: "SecurityException", message: "Current user does not have permissions for the "SysAdminUnitInRole" object", stackTrace: undefined, errors: Array(0)

 

I get my role with Select Query in SysUserInRole

Show all comments

Hi All,

I was not able to use HttpClient in my code to call the Async REST call with POST method.

Can anyone let me know how to use this in my Script Task?

Thanks,

Venkat.

Like 0

Like

1 comments

Dear Vinkat,

I'm afraid it's not completely clear from your description what's wrong. We don't recall the cases when httpclient was used in the ScriptTask but it should work there.

Make sure the necessary namespaces are added to the usings and check it again. In case you face the same difficulties, please provide us with the detailed description of the actions you take and the results you get.

Lisa

Show all comments

Hello,

I can't seem to find the search box on the community page.  I tired both chrome and edge. 

Where did it go?

https://community.bpmonline.com/

 

 

Like 0

Like

2 comments

I see the search is back

Dear John,

In case the issue occurs again, please send this info to the support team so that we will be able to process this request.

Best regards,

Lily

Show all comments

Hello There,

can anyone please tell me what are system requirements in order to start developing system in house.

 

Thanks

Like 0

Like

1 comments

I was wondering if there are working projects of the different public integration methods out there in the community before I reinvent the wheel; besides what is in the development manual, like on GitHub or on this site. I'm looking for actual Visual Studio projects or solutions; boilerplate if you will.  I'm only interested in integration, not BPM customization.  

Second question, where do you find the latest Terrasoft assemblies, if you are working with the cloud version only, not on premise. 

Thanks everyone.

Like 1

Like

1 comments

The project in the article by the link below is working properly. I tested it last month.

https://academy.bpmonline.com/documents/technic-sdk/7-11/working-bpmonl…

Additionally, please check how to track the integration with fiddler. This will help you a lot.

https://academy.bpmonline.com/documents/technic-sdk/7-11/executing-odat…

If you need bpm'online on-site, please email to support@bpmonline.com 

Please note that you will not be able to open bpm'online solutinon in VS, build it and run. Bpm'online is not OpenSource. However, on-side installation allows attaching visual studio and debugging. 

Show all comments

Hello everyone!

How are you? I hope you can help me!

I want to add a column with a link, to set URL of that link I need to get the value of another column hidden in the grid, How could I do this? I do not want to show the column because it takes up a lot of space. I overwrote the method addColumnLink but the line "this.get("someColumn") does not work if the column is hidden. In this case, the column hidden is "UsrRutaArchivo"

I attached images

Thanks in advance!

King regards!

Ezequiel Gomez!

Like 0

Like

1 comments

Dear Ezequirel,

You can call initQueryColumns function in your section schema, so to load all columns. In the function, call addAllColumns you have overridden. In this case, you will be able to access not displayed column in the grid by "this.get("Column"); Please see the example below:

initQueryColumns: function(esq) {
     this.callParent(arguments);
     this.addAllColumns(esq);
},

Hope you find it helpful.

Regards,

Anastasia

Show all comments

Hi All!

We need to make the following query in OData using Http request.

 

SQL query:

 

select A.FieldZ, B.FieldX

from A inner join B on A.FieldA = B.FieldA

Basically the idea is to get data between relationships por example in one request to get an account including their contacts

if it is possible?

 

Thank you

Regards

 

Like 0

Like

1 comments

Hi Experts,

Need your help on how can we insert bulk Contacts. I have written the below code. But need your suggestions to know is there any way that we can insert all the records with a single statement instead of inserting one by one inside loop? I have written this code inside "Script Task".

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

var userConnection = (UserConnection)HttpContext.Current.Session["UserConnection"];

string requestString = string.Format("https://jsonplaceholder.typicode.com/users");

var request = HttpWebRequest.Create(requestString) as HttpWebRequest;

request.Method = "GET";

request.ContentType = "application/json";

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

Set("ProcessSchemaParameter2", "Response Code:"+response.StatusCode +" and Response message is:"+response.StatusDescription);

StreamReader reader = new StreamReader(response.GetResponseStream());

string jsonStr= reader.ReadToEnd();

Set("ProcessSchemaParameter1", reader.ReadToEnd());

dynamic array = JsonConvert.DeserializeObject(jsonStr);

foreach(var item in array)

{

    var insert = new Insert(userConnection).Into("Contact")

        .Set("Name",Column.Const((string) item.name));

    insert.Execute();

}

return true;

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

Thanks,

Venkat.

Like 1

Like

2 comments

Dear Venkat,

Unfortunately, there is no batch query realization with C# in the system. Please proceed every Contact separately.

Regards, 

Anastasia

Anastasia Botezat,

Thanks Anastasia

Show all comments

Hey folks,

   I have been trying to create a record using the DataService as specified here: https://academy.bpmonline.com/documents/technic-sdk/7-8/dataservice-add…

I have a DateTime column in the object I am trying to add, but in the documentation there is nothing saying regarding the format with which I should send the DateTime value to the service. I tried a lot of different known formats (yyyy-MM-dd HH:mm:ss, yyyy-MM-ddTHH:mm:ss, yyyy-MM-dd HH:mm, dd/MM/yyyy HH:mm:ss, yyyy-MM-ddTHH:mm:ss, and so on) but I always get the error message from server:

 {"success":false,"responseStatus":{"ErrorCode":"FormatException","Message":"Input string was not in a correct format.","Errors":[]},"rowsAffected":-1,"nextPrcElReady":false}

The json I am sending is as follows, currently using the format yyyy-MM-ddTHH:mm

{"RootSchemaName":"UsrStudents","ColumnValues":{"Items":{"UsrName":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":"Suporte"}},"UsrEmail":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":"suporte@vedantaonline.org"}},"UsrFederalInscriptionId":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":null}},"UsrAddressLine1":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":null}},"UsrAddressLine2":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":null}},"UsrAddressCity":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":null}},"UsrAddressCountry":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":null}},"UsrAddressZipcode":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":null}},"UsrPhone":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":null}},"UsrCreationTimestamp":{"ExpressionType":2,"Parameter":{"DataValueType":7,"Value":"2016-03-11T11:01"}}}},"Filters":{"FilterType":6,"Items":{"FilterById":{"FilterType":1,"ComparisonType":3,"LeftExpression":{"ExpressionType":0,"Parameter":null,"ColumnPath":"Id"},"RightExpression":{"ExpressionType":2,"Parameter":{"DataValueType":1,"Value":"67b36b17-72ae-4bab-bdd3-eb3159f9150d"},"ColumnPath":null}}}}}

 

The problem happens when I try to set this field: "UsrCreationTimestamp":{"ExpressionType":2,"Parameter":{"DataValueType":7,"Value":"2016-03-11T11:01"}} which is DateTime

 

Best regards

Joao Cechin

Like 0

Like

2 comments

Dear Joao,

Please see the example below of the DateTime format to be used:

{dataValueType: 7, value: ""2017-11-23T16:00:00.000""}

This is November, 23rd, 2017. Time 4 pm or 16:00.

Hope you find it helpful.

Regards,

Anastasia

Anastasia Botezat,

Thank you very much Anastasia!!! I also got it to work sending in the format:

 

"\\/Date(1335205592410)\\/", where the number inside represents the quantity of miliseconds from 01/01/1970 till the date you want to add to the record.

Best Regards,

João

 

Show all comments

Hello everyone!

I hope you can help me!

I want get the value of a property of a element of my Business Process.In this case, I read all of a employee and from my script task, I want to ask about the value of one of fields, "UsrClaveAltaTemprana". The compilation of the script task is correct but when I do the test from the employee's page and I will see ths process log it pulls the following error.

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

   at Terrasoft.Common.ReflectionUtilities.GetPropertyValueByPath(Object source, String propertyPath)

   at Terrasoft.Core.Process.ProcessModel.Get[T](String propertyPath)

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

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

I attached image

 

 

 

 

 

 

 

       

I appreciated your help!

King Regards,

 

Ezequiel Gómez

Like 0

Like

1 comments

Dear Ezequirel,

The reason for an error is that you are trying to obtain value of an Id. Let me explain. 

"UsrClaveAltaTemprana" is a lookup field. Basically, it is a link to another object, so in database it is stored as an Id, but not the value.

If you intend to receive a value, you need to insert a "Read Data" element before a script task. Read the value from the object of "UsrClaveAltaTemprana" lookup, where Id equals the Id retrieved from the record. 

Set received value to new parameter. Then use this parameter in script task.

Hope this helps.

Regards, 

Anastasia

Show all comments