Hi,

In my client module, i want to get the most high parent company of my current company ...

how can i get that ?

Thanks in advance,

Davyd REY

Like 0

Like

4 comments

I have created a Table Sql Server function to get the "master company" of a given company but how can i call it from esq in my client module?

Hi Davyd, how do you identify whether company is parent to your company or not. What parameters do you compare?

Hello there : i have found a way to get the top most account of a given child account (i have created a sqlserver function) but now, i want to execute that sql script from my clientmodule : SELECT * FROM fnGetMasterAccount("<child account id>")



How can i execute it and get the record obtained from ExtJS client module (ESQ?) ?



 

 

Dear Davyd,

You can find the examples of execution and getting the query results from ESQ in our Academy - https://academy.bpmonline.com/documents/technic-sdk/7-11/use-entityschemaquery-implementation-client.

Lisa

Show all comments
7.11
sales_enterprise



Hello Community! Need add a image container on the left of lookup and change that with a function.

Any have a example of code?

Regrads,

 

Like 0

Like

1 comments

Solver using

	{
					"operation": "insert",
					"parentName": "PhotoContainer",
					"propertyName": "items",
					"name": "Photo",
					"values": {
						"getSrcMethod": "getPhotoSrcMethod",
						"onPhotoChange": "onPhotoChange",
						"beforeFileSelected": "beforePhotoFileSelected",
						"readonly": false,
						"generator": "ImageCustomGeneratorV2.generateCustomImageControl"
					}
				},
				{
					"operation": "insert",
					"parentName": "Header",
					"propertyName": "items",
					"name": "Name",
					"values": {
						"layout": {"column": 3, "row": 0, "colSpan": 20},
						"labelWrapConfig": {"classes": {"wrapClassName": ["page-header-label-wrap"]}}
					}
				},

 

Show all comments
7.11
sales_enterprise

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
7.11
sales_enterprise



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
script task
collection
7.11
sales_enterprise



Hello community!

I need get in a bussines process a collection parameter and then use that in a script task into a foreach. Any example about that?

 

Regards,

 

Like 0

Like

5 comments

Dear Federico,

Please check the instructions on how to work with collections within [Read data element]. This will help you to implement your own process.



Algorithm of the work with a collection from Read data:



1.Disable the formula validator in business process designer. You can open the console and execute the following script for that:

var featureCode = "UseProcessFormulaServerValidation";

require(["FeatureServiceRequest"], function() {

                var featureRequest = Ext.create("Terrasoft.FeatureServiceRequest", {code: featureCode});

                featureRequest.updateFeatureState({

                               forAllUsers: true,

                               state: Terrasoft.FeatureState.DISABLED // ENABLED

                }, ()=>console.log("Done"));

});

 

2. In [Read data] element go to extended options and tick:

Read first = true

Number of records to read = 100 //Number of records available in a collection.



3. Create a process parameter with EntityCollection type and map it to the resulting collection of [Read data]. This parameter does not exist out of the box, but you can create it manually. 

Example:

[#MyRead.Resulting collection#]

*  MyRead – [Read data] element header.

* Resulting Collection - added manually

 

4. Assign a process parameter to a new variable in ScriptTask. Here is the example how to process the collection:

EntityCollection entities = Get("MyEntity");

var result = new Collection();

foreach(Entity entity in entities) {

                var cityName = entity.GetTypedColumnValue("Id");

                string temp = cityName.ToString();

                result.Add(temp);

                }

 

string displayValue = result.ConcatIfNotEmpty(",");

Set("MyResult", displayValue);

return true;

 

MyRead – reading datat in any element.

MyEntity process parameter with EntityCollection type. Parameter value= [#MyRead.Resulting collection#]

MyResult - string parameter. You can store record IDs from the collection. Then this parameter is shown on the auto generated page for the testing purposes.  

Best regards,

Lily

Lily Johnson,

Hello,

I tried the above script task as below:

EntityCollection entities = Get("MyEntity");

var result = new Collection();

foreach(Entity entity in entities) {

                var productName = entity.GetTypedColumnValue("Name");

                string temp = productName.ToString();

                result.Add(temp);

                }

string displayValue = result.ConcatIfNotEmpty(",");

Set("UsrLatestOrderProduct", displayValue);

return true;

 

But, here I'm getting below errors:

 

Lily Johnson,

Hello,

 

Can you elaborate on how Auto-Generated Page works upon this case? 

 

Many Thanks

Riddhi Jadeja,



As we can see from the screenshots you have provided - GetTypedColumnValue is used incorrectly. 

GetTypedColumnValue("Name") is used without specified type of this field. 

It should be GetTypedColumnValue<string>("Name")



Kind regards,

Roman

Sarthak Jain,



Can you please specify your question with more details? 

How exactly Auto-Generated Page will be related to the discussed case? 



Thank you in advance,

Roman

Show all comments
menssage
script task
notification
7.11
sales_enterprise

Hello Community!

Any have a example to send a notification menssage from script task c#?

The idea is make a foreach and for each value send a notification to the user.

Regrads, 

 

Like 1

Like

2 comments

Dear Federico,

Here's the example for you:

//create reminding
/**
                 * @param addresserContactId // select Id from Contact
                 * @param addresseeContactId //select Id from Contact
                 * @ RemindTime {DateTime}
                 * @param description {String}
                 * @param subjectRecordId //select Id from [your schema]
                 * @param sourceId // select Id from RemindingSource --where Name = 'Owner' or Name = 'Author'
                 * @param sysSchemaUid //select Uid from SysSchema where Name = [your schema]
                 * @param subjectCaption {String}
                 * @param typeCaption {String}
                 *
                 * return {Terrasoft.Collection of InsertQuery}
                 */
                createRemindingInsert: function (addresserContactId, addresseeContactId, remindTime, description,
                                                 subjectRecordId, sourceId, sysSchemaUid, subjectCaption, typeCaption) {
                    var insert = Ext.create('Terrasoft.InsertQuery', {
                        rootSchemaName: "Reminding"
                    });
                    insert.setParameterValue('Id', Terrasoft.generateGUID(), Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('CreatedOn', new Date(), Terrasoft.DataValueType.DATE_TIME);
                    insert.setParameterValue('CreatedBy', Terrasoft.SysValue.CURRENT_USER_CONTACT.value, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('ModifiedOn', new Date(), Terrasoft.DataValueType.DATE_TIME);
                    insert.setParameterValue('ModifiedBy', Terrasoft.SysValue.CURRENT_USER_CONTACT.value, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('Author', addresserContactId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('Contact', addresseeContactId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('RemindTime', remindTime, Terrasoft.DataValueType.DATE_TIME);
                    insert.setParameterValue('Description', description, Terrasoft.DataValueType.TEXT);
                    insert.setParameterValue('SubjectId', subjectRecordId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('Source', sourceId, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('SysEntitySchema', sysSchemaUid, Terrasoft.DataValueType.GUID);
                    insert.setParameterValue('SubjectCaption', subjectCaption, Terrasoft.DataValueType.TEXT);
                    insert.setParameterValue('TypeCaption', typeCaption, Terrasoft.DataValueType.TEXT);

                    return insert;
                },
                /**
                 *
                 * @param remindingInsertCollection {Terrasoft.Collection of InsertQuery}
                 * @param callback
                 */
                executeReminding: function (remindingInsertCollection, callback, scope) {
                    var batchQuery = Ext.create("Terrasoft.BatchQuery");
                    Terrasoft.each(remindingInsertCollection.getItems(), function (insertQuery) {
                        batchQuery.add(insertQuery);
                    });
                    batchQuery.execute(callback, scope);
                }


Lisa

Lisa Brown,

Hi Lisa. Its been a few yrs since your reply. Is there a better way to do this in the product now? The code you have mentioned writes to the DB and triggers an execute. 

Show all comments
dashboards
dashboard
Forecast
7.11
sales_enterprise

I'm trying to create a dashboard to compare our sales pipeline to our forecast data. I've created the opportunity series of the dashboard; however, I'm stuck on the forecast portion. Is creating this dashboard possible? And if it is, can someone please explain how I'd go about creating it? I've created all of the other dashboards we need, but this one has me stuck. Help!

Like 0

Like

2 comments

Dear Jess,

Unfortunately, there is no option to create a dashboard based on the [Forecasts] section because it uses tables of other sections in the Data Base. As an alternative, you can build charts on objects of [Opportunities] and [Invoices]. 

We have registered the suggestion to allow building the dashboards based on the forecasts directly. Our R&D team will consider it for the further releases. 

Lisa

Lisa Brown,

Is there any news about this topic? 

Thanks 

Show all comments
7.11
sales_enterprise

Hello Community!

I need get a value int or string from action run in detail. The idea is get this value and work with that.

Any have idea to make it?

Regards,

 

Like 0

Like

1 comments

Dear Federico,

 

In order to get the value and use it further, please do the following:

1. In the executing function, which follows after the click, please use JavaScript prompt method to receive needed information;

2, Afterwards, use this value further in the code.

Also, here are the examples of how to get values, if not by the prompt oprtion:

- if to get value from other object (section, detail) you need to write an ESQ to that object https://academy.bpmonline.com/documents/technic-sdk/7-8/building-paths-…;

- if to get from the minipage itself, please use this.get("ColumnName");

Regards,

Anastasia

Show all comments
7.11
sales_enterprise



Hello Community!

I need save the entity but without callback just keep in the page.

this.save() have the return to the page back.



Regrads,

 

Like 0

Like

1 comments

Dear Federico,

Try to add isSilent: false. 

Lisa

Show all comments
batchquery
7.11
sales_enterprise

Hello community!!

I need construct a batchquery but in one column is necesary constuct a string with the id of the object. How can call the id object in the insert?

 

var insert = Ext.create("Terrasoft.InsertQuery", {
		                        rootSchemaName: "Entity"
			                    });
insert.setParameterValue("EmailURL", "?entityid=" + //Need put the Id of object Entity//, this.Terrasoft.DataValueType.TEXT);

bq.add(insert);

 

Like 0

Like

2 comments

Dear Federico,

In order to use the Id of the entity you created, you need to specify this ID before creation.

You can generate new Id by using Terrasoft.generateGUID() method:

var newGuid = Terrasoft.generateGUID();
var insert = Ext.create("Terrasoft.InsertQuery", {
   rootSchemaName: "Entity"
});
insert.setParameterValue("Id", newGuid, Terrasoft.DataValueType.GUID);
insert.setParameterValue("EmailURL", "?entityid=" + newGuid, this.Terrasoft.DataValueType.TEXT);
 
bq.add(insert);

Regards,

Anastasia

Anastasia Botezat,

 



Is there a way to do Terrasoft.generateGUID(); in server side web service?

 

 

Show all comments