Hi everyone, 

When I try to use the change event to bindTo a function, I get the following error : "Uncaught TypeError: Cannot read property 'changeMethod' of undefined".

In my diff schema, the change event has a bound function: 

{
    "operation": "insert",
    "name": "Product",
    "values": {
        "layout": {
            "colSpan": 12,
            "rowSpan": 1,
            "column": 0,
            "row": 1,
            "layoutName": "MyLayout"
        },
        "bindTo": "MyLookup",
        "contentType": Terrasoft.ContentType.LOOKUP,
        "enabled": true,
        "change": {
            bindTo: "setProduct"
        },
        "contentType": 3
    },
    "parentName": "MyLayout",
    "propertyName": "items",
    "index": 1
}

And I call it's method handler with the following. 

setProduct: function() {
    console.log("Success!");
}

Adding the "change": { bindTo: "setProduct" } causes the page to not load. Is there a way to activate a JavaScript function when a select element on a page is changed? I need to change the values in a corresponding select element based on the value of the preceding select element.

Like 0

Like

1 comments

Hi,

In order to overcome such issue, please, check that you have binded to an existing lookup "MyLookup". Also, you can try another change method approach. 

In the onEntityInitialized function do the following:

onEntityInitialized: function(){
  this.callParent(arguments);
  this.on("change:Product", this.setProduct, this);
}

Hope this helps.

Regards,

Anastasia

Show all comments

Dear Community experts,

I have to integrate bpmonline with wordpress so once we submit an order the available products is updated to wordpress, we already implemented .Net project to do the job.

our .Net project is using the rest API and has reference to Newtonsoft.json dll file. we have some classes and three functions.

My question is : How I can apply such .Net project in bpmonline, where I have to add the references and the classes and functions.

 

I would like to be thankful, if someone can direct me to similar work or any documentation or steps to do such job.

 

Best Regards,

Mohammad

Like 0

Like

1 comments

Dear Mohammad,

Once your project is already written, there are several options to choose from.

1. Deploy your project as a web project or a Web API project. Further, on the side of bpm'online, call the needed URL with all necessary data from any C# schema or business process script task element.

2. Add the project .dll to the "External assemblies" tab in the system Configuration. Use it in the C# schemas and call its methods in business process script task elements.

Also, keep in mind, not to upload a .dll file if it already exists in the system, since it will cause versions conflict. 

Basically, you create a business process, which triggers by the signal you need. Afterwards, in the script element of this BP you either use methods (option 2) or form a request to a external Web API (option 1).

Moreover, we already have Newtonsoft.json dll file in the system.

Hope you find it helpful.

Regards,

Anastasia

Show all comments

Hi, somebody could help to me to change or delete the Supervisor pwd from SQL?

Thanks in advance,

Julio Falcon

Like 0

Like

4 comments

Dear Julio,

The passwords are stored encrypted in the SysAdminUnit table. You can directly change the password through the database only if you know its hash. The simple sql query would look like this:

update SysAdminUnit set UserPassword = 'your_hash'
 
where name = 'Supervisor'

In case you do not have access to the admin user and need to reset the password I would recommend you to contact the system administrator or a  support team.

Best regards,

Matt Watts

Matt Watts,Thanks Matt, what happens if i haven't the hash, can I create a blank pwd using 

update SysAdminUnit set UserPassword = ''
where name = 'Supervisor'

for other side, wich is the ID of the Supervisor user, is always in all db the same?

Thanks in advance

Dear Julio,

Yes, the hash for the password stays the same, and the password cannot be blank. 

Best regards,

Matt

Hello Robert, 



It would be better not to create hash manually. 

You may use this one if you need to insert it directly to your database. 

It's for the simple Supervisor password: "JSDCg18tavKu1PPRqdP6t.AgqDORMm2cT7oDjw66hML64avIF/Qa2"



You can paste it for the needed system user by running the SQL query mentioned in a few messages above in the thread. 



Kind regards,

Roman

Show all comments

Hello!

How are you?

I hope your help me!

Is there any way to export all or part of the database from a Cloud enviroment, including tables that contain files?

Regards,

Ezequiel 

Like 0

Like

1 comments

Ezequiel you can send the request to support and they send you a backup of the database. Is not posible access to the database in cloud sites.

Show all comments

Hello Community!!

I need give access to user by code to a Record. Like when you access to the access right in the object and add read/edit/delete permitions.

 

Regards,

 

Like 0

Like

3 comments

Dear Federico,

If you want to distribute the access rights to records automatically, you need to use Change access rights element and configure the process in the way you want: https://academy.bpmonline.com/documents/technic-bpms/7-11/change-access-rights-process-item

This element can give such permissions to records automatically. 

Best regards,

Lily

Lily Johnson,

Thank you! but exist way to make that by insert sql o maybe a function javascript?

Dear Federico,

Sure, you can make it by SQL queries or JS but the standard change access rights functionality is implemented by the business process that can be called by trigger or you can call in the backend code as it is described in our development guide: https://academy.bpmonline.com/documents/technic-sdk/7-11/how-run-process-client-module 

Best regards,

Lily

Show all comments

Is there a way to send an attachment inside of a business process?

  • The attachment location/directory is data driven, different for each contact
Like 0

Like

4 comments

Dear John,

 

Here's the method that can be used to implement sending the attachments within business process:

		public static bool SendMail(string mailto, string caption, string message, Guid FileId, string SchemaName, UserConnection userConn) {
			SchemaName+="File";
			string smtpServer = Terrasoft.Core.Configuration.SysSettings.GetValue(userConn, "SFsmtpServer").ToString();
			string from = Terrasoft.Core.Configuration.SysSettings.GetValue(userConn, "SFFrom").ToString();
			string password = Terrasoft.Core.Configuration.SysSettings.GetValue(userConn, "SFPassword").ToString();
			Stream FileA = null;
			string Fname = "";
			var esq = new EntitySchemaQuery(userConn.EntitySchemaManager, SchemaName);
			esq.AddAllSchemaColumns();
			esq.Filters.Add(esq.CreateFilterWithParameters(FilterComparisonType.Equal, "Id",FileId));
			var coll = esq.GetEntityCollection(userConn);
			foreach(var ent in coll) {
				FileA = ent.GetStreamValue("Data");
				Fname = ent.GetTypedColumnValue<string>("Name");
				break;
			}
			try {
				MailMessage mail = new MailMessage();
				mail.From = new MailAddress(from);
				mail.To.Add(new MailAddress(mailto));
				mail.Subject = caption;
				mail.Body = message;
				mail.IsBodyHtml = true;
				if (FileA != null)
					mail.Attachments.Add(new Attachment(FileA, Fname));
				SmtpClient client = new SmtpClient();
				client.Host = smtpServer;
				client.Port = 587;
 
				client.EnableSsl = true;
				client.Credentials = new NetworkCredential(from.Split('@')[0], password);
				client.DeliveryMethod = SmtpDeliveryMethod.Network;
 
				client.Send(mail);
				mail.Dispose();
				return true;
			} catch(Exception e) {
				throw new Exception("Mail.Send: " + e.Message);
			}
		}

Please note that in this case the file is taken from Attachments and Files tab of the record. If you want to take the file from the external resource you'll need to develop the additional integration.

Lisa

 

Lisa Brown,

Is posible select the sender mailConfiguration? This code take the default email. I need select a shared configuration.

Lisa Brown,

Please feel free to use ESQ to find the mailbox that you need.

https://academy.bpmonline.com/documents/technic-sdk/7-11/use-entitysche…

All user mailboxes are in the MailboxSyncSettings table.

Eugene Podkovka,

Hi, using the script above, is it possible to let the user edit the email message before sending? (like you can do when you use the [ Send email ]?

Show all comments

Hi!

How are you?

I hope you can help me!

How can I add the Employee image to my printable template? I add the "Photo" field of the Contact associated to Employee to template but it show an Guid instead of the Photo.

Thank you!

Regards,

Ezequiel

Like 0

Like

1 comments

Dear Ezequiel,

To get the picture of the contact, please check the screenshots below:

 Then within the contact object, please find photo and choose the image:

Within the printable template it Word it will look in such a way:

Best regards,

Lily

Show all comments

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 Community!

I need hide a detail with specific condition. I using the example rule in the academy https://academy.bpmonline.com/documents/technic-sdk/7-11/how-hide-edit-… but need compare with more that one value in the right condition like IN SQL condition.

Any idea about that?

Regards,

 

Like 0

Like

1 comments