relationship
contacts
7.11
sales_enterprise

Hello community I'm trying show a Contact.Type in a custom profile. But i have a error when put the diff:

	{
		"operation": "insert",
		"name": "ContactType",
		"values": {
			"layout": {
				"colSpan": 24,
				"rowSpan": 1,
				"column": 0,
				"row": 1,
				"layoutName": "UsrLeftContainer"
			},
			"bindTo": "Contact.Type",
			"enabled": true,
			"contentType": 5
		},
		"parentName": "UsrLeftContainer",
		"propertyName": "items",
		"index": 0
	},

And the console return me:

Heading for label Contact.Type not found.

 

Is something worn in the code?

 

Regards,

 

 

 

Like 0

Like

1 comments

Unfortunately, the out-of-the-box system doesn't allow displaying linked fields. If you want to do this, you need to create a custom control that will process the linked field. If you want only show the value without a modification option, please consider creating a new field linked to an attribute (virtual column). This way you'll need to fill the attribute in with the needed value with a method. Please search the "dependencies" keyword in an out-of-the-box js code for more information. 

Show all comments
7.11
sales_enterprise

Hello Community!!

 

I have 2 sections appoint to contact and I regiter this sections in sysModule table and all works ok but the problem is the menssages on the Feed. 

If I put a menssage to ahoter user. When the user want open the message (in the notification Center) I get the function:

 

Terrasoft.ModuleUtils.getEntityStructureByName(entitySchemaName); 

 

TypeError: entityStructure is undefined NetworkUtilities.js:101:8

 

Any know if need register the section in other table related with Feed Notifications?

 

Regards,

 

Like 0

Like

3 comments

Dear Federico,

First of all, we recommend you to create sections via the section wizard, since creating them the way you have described can lead to various conflicts in a database structure. Also, it is not recommended to create two sections, that point to the exact same object for the same reason.

Moreover, we recommend you to debug your customization using your browser's developers tools in case you still want to proceed working with your customization. Also, you can refer to the development documentation for more information.

Best regards,

Matt Watts

Matt Watts,

 Thank you! Can you please give me the code of the function?

Terrasoft.ModuleUtils.getEntityStructureByName(entitySchemaName); may be can check the code to see the error.

Federico Buffa,

You can find the needed method in the ModuleUtils schema of the NUI package.

Here is the code sample you need, but you can refer to the schema if needed.

getEntityStructureByName: function(entitySchemaName) {
			var entityStructure = this.entityStructure || {};
			return entityStructure[entitySchemaName];
		},

Best regards, 

Matt

Show all comments
container
LeftModulesContainers
7.11
sales_enterprise



Hello Community!!

How can add a new Left Container in the LeftModulesContainers? I need a new container with fields like profilecontainer.

Regards,

 

Like 0

Like

3 comments

It seems like you can do this with a section wizard. Just add fields into the container showed on the screenshot below and the system will create a new container automatically. 

 

 

Eugene Podkovka,

 In the custom sections only shows the profilecontainer.

Please add a new container manually and then use "Section wizard" to fill it in.

{

        "operation": "insert",

        "name": "UsrLeftContainer",

        "parentName": "LeftModulesContainer",

        "propertyName": "items",

        "values": {

            "itemType": Terrasoft.ViewItemType.GRID_LAYOUT,

            "items": []

        }

    }

 

Show all comments
7.11
sales_enterprise

Hi All,

We would like to put extra filter on a detail.



For example: A list of open opportunities. I could not file good example in the documentaion.



Is there anyone who has same experience?

Like 0

Like

2 comments
Best reply

Dear Cheng,

You can use the Email detail from the Contact page as an example. There is a fixed filter there that allows the user to see the activities with the certain category (Email) only. 

The schema looks like this:

EmailDetailV2: {
   schemaName: "EmailDetailV2",
   filter: {
      masterColumn: "Id",
      detailColumn: "Contact"
   },
   filterMethod: "emailDetailFilter"
}

You need to pay attention to the filterMethod usage and create the necessary ESQ filters inside the method:

filterGroup.add(
   "EmailFilter",
   this.Terrasoft.createColumnFilterWithParameter(
      this.Terrasoft.ComparisonType.EQUAL,
      "Type",
      ConfigurationConstants.Activity.Type.Email
   )
);

Lisa

Dear Cheng,

You can use the Email detail from the Contact page as an example. There is a fixed filter there that allows the user to see the activities with the certain category (Email) only. 

The schema looks like this:

EmailDetailV2: {
   schemaName: "EmailDetailV2",
   filter: {
      masterColumn: "Id",
      detailColumn: "Contact"
   },
   filterMethod: "emailDetailFilter"
}

You need to pay attention to the filterMethod usage and create the necessary ESQ filters inside the method:

filterGroup.add(
   "EmailFilter",
   this.Terrasoft.createColumnFilterWithParameter(
      this.Terrasoft.ComparisonType.EQUAL,
      "Type",
      ConfigurationConstants.Activity.Type.Email
   )
);

Lisa

Lisa Brown,

Thank you. It works now.

Show all comments
7.11
sales_enterprise
#addProductImage
#Orders

How can we add a Product Image in the Product Selection page in the [Orders] section? Please suggest.

Like 0

Like

1 comments

Dear Anupama,

This is a quite complex functionality to implement, which requires developer's skills. In the core, the idea is to add one extra column to the grid of product selection page and display product image there.

In order to add extra field to the grid you need to do the following:

1. Add the ProductSelectionViewModel replacing schema

2. Copy all the code to the replaced schema from the parent schema

3. Add Dependencies as in the parent schema

4. Add a custom variable in all methods where the standard fields "Unit, Price , Currency, Tax, Code, Available" are

5. Save the replaced schema

6. Add the ProductSelectionView replacement schema

7. Copy all the code to the replaced schema from the parent

8. Add Dependencies from the parent schema

9. In the getEditableGridConfig and getGridCaptionConfig methods, add the custom field for the picture

 10. Save replacement schema

By the means of basic JS methods like "getImageURL" (it is also present in the ProductSelectionViewModel schema) insert image to the  column. You can also take a product page as an example of usage of image functionality.

Hope you find it helpful.

Regards,

Anastasia

Show all comments

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