Hi Community

 

I want to remove the hyperlink from lookup fields. To achieve this I have followed this community article. This worked fine on the edit page. But on the section list view hyperlinks are still showing as shown below.

 

 

Is there a way I can remove the hyperlink on the list view conditionally as well instead of removing the "Display value" property from the object setting?

 

 

Any lead will be appreciated.

 

Regards,

Sourav Kumar Samal

Like 0

Like

9 comments

Hi, the logic for marking columns as links on section pages is based on the method addLookupColumnLink and if you want to modify it, you need to override it. For example, in the contact section, I need to remove a link to the column "Owner". The code to do this:

 

define("ContactSectionV2", [], function() {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			addLookupColumnLink: function(item, column) {
				if (column.columnPath == "Owner"){
					console.log("We don't add link");
				} else {
					this.callParent(arguments);
				}
			}
		}
	};
});

 

Dmytro Vovchenko,

 

I have tried the above code, but the method was never called, attached a screenshot for reference.

 

 

Is there anything I am missing here?

 

Regards,

Sourav

Sourav Kumar Samal,

If you want to remove a link from a primary column the method you need in this situation is addPrimaryColumnLink

define("ContactSectionV2", [], function() {
	return {
		entitySchemaName: "Contact",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
		]/**SCHEMA_DIFF*/,
		methods: {
			addLookupColumnLink: function(item, column) {
				if (column.columnPath == "Owner"){
					console.log("We don't add link");
				} else {
					this.callParent(arguments);
				}
			},
			addPrimaryColumnLink: function(item, column) {
				return false;
			}
		}
	};
});

Result:

Dmytro Vovchenko,

 

Is there a way to do the same thing on the dashboard list?

 

Regards,

Sourav

Sourav Kumar Samal,

In this case, look at the DashboardGridModule schema. I believe you would need to modify the same methods. But, overriding the 

DashboardGridModule is much more difficult than the section pages.

Does anybody know of a Freedom UI equivalent for doing this?

Hi Harvey,

 

In Freedom UI, on the Form page, you may remove the hyperlink from lookup fields by specifying the property "showValueAsLink": false in attributes values. 

 

As for the List page, unfortunately, there is no such possibility so far. However, our R&D team is already working on the feature that will allow turning off link generation for lookup columns of related objects, so it is expected to be implemented in future releases (no ETA yet).

 

Best regards, 

Natalia

 

 

Thanks Natalia, it's good news that there is something in the pipeline! Do you know if the solution will allow removing links for the entity itself if desired? i.e. if we have a list based over the Account entity, having it so that the Name column does not show as a link? We wouldn't want to remove that link in all cases, but in some lists it might not be wanted. For example, especially on modal lookup windows, we might want to disable the display column from being a link, as it can be confusing for users who want to select the record but click the link and get taken to the edit page instead of selecting the record.

Harvey Adcock,

 

The feature should work for both - the section list (on the List page) and the Lookup component list. It is planned that the links that lead to other entities' edit pages will be removed by default, and after enabling the feature, they will become available.

We will highlight your comments to the R&D team.
Thank you for being an active participant of the Creatio community!

Show all comments

Hello community,

 

I have a case where based on a lookup value, I need to display an image. The code is working and logging values as expected but the image does not seem to load. When inspect HTML I find the following

[object Object]" title="">

 

and the error

https://dev2-is-il.creatio.com/0/Nui/[object%20Object] 404

 

However my method is returning the correct URL 

https://dev2-is-il.creatio.com/0/conf/content/img/UsrRequests1Page-Dril…

 

Please find the code below



Diff

{
				"operation": "insert",
				"name": "UsrProjectCategoryCaption",
				"values": {
					"itemType": 6,
					"layout": {
						"colSpan": 24,
						"rowSpan": 1,
						"column": 0,
						"row": 0
					},
					"visible":  {
						"bindTo": "IsPrjCatIconContVisible"
					},
					"caption": {
						"bindTo": "Resources.Strings.ProjectCategoryCaption"
					}
				},
				"parentName": "ProfileContainer",
				"propertyName": "items",
				"index": 0
			},
			{
				"operation": "insert",
				"name": "AccountPhotoContainer",
				"values": {
					"itemType": 7,
					"wrapClass": [
						"image-edit-container"
					],
					"items": [],
					"layout": {
						"colSpan": 24,
						"rowSpan": 1,
						"column": 0,
						"row": 1
					},
					"visible":  {
						"bindTo": "IsPrjCatIconContVisible"
					},
				},
				"parentName": "ProfileContainer",
				"propertyName": "items",
				"index": 1
			},
			{
				"operation": "insert",
				"name": "Photo",
				"values": {
					"layout": {
						"colSpan": 24,
						"rowSpan": 1,
						"column": 0,
						"row": 2
					},
					"getSrcMethod": "getPhotoSrcMethod",
					"readonly": true,
					/*"defaultImage": {
								"bindTo": "getPhotoSrcMethod"
					},*/
					"generator": "ImageCustomGeneratorV2.generateCustomImageControl"
				},
				"parentName": "AccountPhotoContainer",
				"propertyName": "items",
				"index": 0
			},

 

Methods

 

getPhotoSrcMethod:function()
			{
 
			    var reqId=this.get("Id"); 
				this.getProjectCategory(reqId, function(result) {
 
					 this.console.log("cbdone:" + result);
					 if(result.pjtCatId==="5f43b0aa-f7f6-4ffa-bc6d-15cf1fd581e0")
							{
								this.console.log("getIcon NationalPriorityImage");
								this.set("Resources.Strings.ProjectCategoryCaption", result.pjtCatName);
								this.set("IsPrjCatIconContVisible", true);
								this.console.log("IsPrjCatIconContVisible true");
								//class="ts-image-edit-full-size-element ts-image-style-rectangular"
 
						 		return this.Terrasoft.ImageUrlBuilder.getUrl(this.get("Resources.Images.NationalPriorityImage"));
							}
						else if(result.pjtCatId==="08135814-ecdb-48ed-adea-5d4e5f1b0129")
							{
								this.console.log("getIcon BicyclePathsIcon");
								this.set("Resources.Strings.ProjectCategoryCaption", result.pjtCatName);
								this.set("IsPrjCatIconContVisible", true);
 
								return this.Terrasoft.ImageUrlBuilder.getUrl(this.get("Resources.Images.BicyclePathsIcon"));
							}
						else if(result.pjtCatId==="a1a8e24d-6c6c-49ea-bb3c-5d76da662a27")
							{			   
								this.console.log("getIcon DrillingExplorationIcon");
								this.set("Resources.Strings.ProjectCategoryCaption", result.pjtCatName);
								this.set("IsPrjCatIconContVisible", true);
								this.console.log(this.Terrasoft.ImageUrlBuilder.getUrl(this.get("Resources.Images.DrillingExplorationIcon")));
							//	return this.getSchemaImageUrl(this.get("Resources.Images.DrillingExplorationIcon"));
								return this.Terrasoft.ImageUrlBuilder.getUrl(this.get("Resources.Images.DrillingExplorationIcon"));
 
							}
						else if(result.pjtCatId==="18588952-b4bf-4477-a614-a15a103adc28")
							{
								this.console.log("getIcon DrillimgAndNPIcon");
								this.set("Resources.Strings.ProjectCategoryCaption", result.pjtCatName);
								this.set("IsPrjCatIconContVisible", true);
 
								return this.Terrasoft.ImageUrlBuilder.getUrl(this.get("Resources.Images.DrillingAndNPIcon"));
							}
						else
							{
								this.set("IsPrjCatIconContVisible", false);
								this.console.log("IsPrjCatIconContVisible is false due to regular prj 2");
								return this.Terrasoft.ImageUrlBuilder.getUrl(this.get("Resources.Images.AnalyticsDataIcon"));
 
							}
 
                        },this);
 
 
			},
			getProjectCategory :function(reqId,callback,scope)
			{
				var result;
				var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
					rootSchemaName: "UsrRequests"
				});
				esq.addColumn("Id");
				esq.addColumn("UsrProject.UsrProjectCategory.Id","CatId");
				esq.addColumn("UsrProject.UsrProjectCategory.Name","CatName");
				esq.filters.add("ProjectFilter", Terrasoft.createColumnFilterWithParameter(
						Terrasoft.ComparisonType.EQUAL, "Id",reqId));
				esq.getEntityCollection(function(result) {
 
					var resultValue = result.collection.collection.items;
					var pjtCatId = resultValue[0].values.CatId;
					var pjtCatName = resultValue[0].values.CatName;
					this.console.log("pjtCatId:" + pjtCatId);
					this.console.log("pjtCatName:" + pjtCatName);
					result ={ success:true,
							  pjtCatId : pjtCatId,
							  pjtCatName:pjtCatName
							};
					callback.call(scope || this, result);
				},this);
			},

 

Like 0

Like

6 comments
Best reply

Shivani Lakshman,

Rather than bind the image element in the diff to the function (which won't work since the ESQ in the function is asynchronous), bind it to an attribute, then set the attribute in the asynchronous function (and just call the function in the onEntityInitialized).

Example:

First add the attribute:

"MyImageAttr": {
	dataValueType: Terrasoft.DataValueType.TEXT,
	type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
	value: ""
}

Then, create the function that retrieves the image using the ESQ:

function getImage() {
	// do the ESQ to get the image, then simply set in attribute
	this.set("MyImageAttr", Terrasoft.ImageUrlBuilder.getUrl(imageConfig));
}
 
// also call image from onEntityInitialized so it runs when the record is loaded
function onEntityInitialized() {
	this.callParent(arguments);
	this.getImage();
}

Now, add the image to the diff, bound to the attribute:

// image element in diff
// note "MyImageAttr" is an attribute we're binding to
{
	"operation": "insert",
	"name": "MyImage",
	"parentName": "ImageContainer",
	"propertyName": "items",
	"values": {
		"itemType": Terrasoft.ViewItemType.COMPONENT,
		"className": "Terrasoft.ImageView",
		"imageSrc": {"bindTo": "MyImageAttr"}
	}
}

Then the record loads, it will run the ESQ in the function, which will set the attribute with the image. Since the diff element is bound to the attribute, it will show the image when it is set, so it won't matter that the ESQ is asynchronous. 

Ryan

Hello Shivani,

 

As far as I remember there is no way to dynamically modify the image in the photo container from the client side code since it's strictly connected to the value stored in the "Photo" column of the object. In this case you may try modifying the photo on the server side and refresh the page if needed.

Oleg Drobina,

 

I believe we can. We have already implemented this in another section. Please see a screen grab in this link

 

https://drive.google.com/file/d/1BKT6E_azsOjjh1N9VZh0bPpfUjrttm79/view?…



We posted on the forum here because for some reason the code is not working when there is esq involved.

 

 

Shivani Lakshman,

 

Ok, I was wrong, then this is possible. Then probably the reason is that esq is asynchronous and you don't get the data needed at the moment the image should be loaded to the UI (this is the most probable reason). In this case try avoiding using esq and use some other approach.

Oleg Drobina,

 

I have used callback and when the breakpoint hits my method, the code for  

the image I need hits before the default image gets loaded. I am actually puzzled ? 

 

Can you please suggest another approach ? I don’t want to add another column because this image will be dynamic and change frequently.

 

Is there an attribute that can hold images and that can be loaded onto the UI?

 

Would appreciate your help here!

Shivani Lakshman,

Rather than bind the image element in the diff to the function (which won't work since the ESQ in the function is asynchronous), bind it to an attribute, then set the attribute in the asynchronous function (and just call the function in the onEntityInitialized).

Example:

First add the attribute:

"MyImageAttr": {
	dataValueType: Terrasoft.DataValueType.TEXT,
	type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
	value: ""
}

Then, create the function that retrieves the image using the ESQ:

function getImage() {
	// do the ESQ to get the image, then simply set in attribute
	this.set("MyImageAttr", Terrasoft.ImageUrlBuilder.getUrl(imageConfig));
}
 
// also call image from onEntityInitialized so it runs when the record is loaded
function onEntityInitialized() {
	this.callParent(arguments);
	this.getImage();
}

Now, add the image to the diff, bound to the attribute:

// image element in diff
// note "MyImageAttr" is an attribute we're binding to
{
	"operation": "insert",
	"name": "MyImage",
	"parentName": "ImageContainer",
	"propertyName": "items",
	"values": {
		"itemType": Terrasoft.ViewItemType.COMPONENT,
		"className": "Terrasoft.ImageView",
		"imageSrc": {"bindTo": "MyImageAttr"}
	}
}

Then the record loads, it will run the ESQ in the function, which will set the attribute with the image. Since the diff element is bound to the attribute, it will show the image when it is set, so it won't matter that the ESQ is asynchronous. 

Ryan

Ryan Farley,

 

Thank you for your help! Really appreciate it :)

Show all comments

Hi Team,

 

I am trying to read the current user's role by using the following custom logic.

GetCurrentUserRole: function(){
				var scope = this;
				var esq = Ext.create("Terrasoft.EntitySchemaQuery", {rootSchemaName: "SysUserInRole"});
				esq.addColumn("SysRole");
				esq.filters.add("UserFilter", Terrasoft.createColumnFilterWithParameter(
    				Terrasoft.ComparisonType.EQUAL, "SysUser", Terrasoft.SysValue.CURRENT_USER.value
				));
				esq.getEntityCollection(function(result) {
					if (!result.success || result.collection.getItems().length === 0) {return;}
					result.collection.each(function(item) { 
						var role = item.get("SysRole");
						var roleName = role.displayValue;
						var roleId = role.value;
						this.console.log("roleName: ",roleName);
					});
				}, this);
				return true;
			},

The above code works perfectly fine while logged in as a Normal user, but the same doesn't work for Portal users. For portal users, the "roleId" variable gives the correct Id but the variable "roleName" shows as a blank string("") because it is not reading the displayValue.

 

To address the issue, I have added "SysUserInRole" and "SysAdminUnit" in the lookup named "List of objects available for portal users". Also the Object permissions for both the tables are default. But still no luck in getting the desired output.

 

Request any suggestions or additional steps that I need to perform to get the displayValue of current user role while logged in as a portal user.

 

Regards,

Sourav Kumar Samal

Like 0

Like

1 comments
Best reply

Hi Sourav,

 

I was able to achieve the result needed by adding the "System administration object" schema to the "List of objects available for portal users" lookup and relogin under the portal user. Try the same approach on your side, it should work.

Hi Sourav,

 

I was able to achieve the result needed by adding the "System administration object" schema to the "List of objects available for portal users" lookup and relogin under the portal user. Try the same approach on your side, it should work.

Show all comments

In the word report that I have created I want to use the characters  « someWords here... ». By default creatio uses these characters to indicate a field name but in my case I have to use these characters on my document as normal characters.

I am using a formula in MS word that makes a sentence appear in my word report only if a specific field is not equal to 0

  • Here is the place I have written the formula that contains special characters (which are not indicating any field name)

 

  • The formula I used: 

Contract Clauses No[#AddTextIfNotEqual|0;words... « someWords here between these chars...  » words again... :#]

 

  • The result I get when report is printed:

words… \« someWords here between the special chars \» words again

 

As you can see Creatio reads these chars (« ») as special chars and adds slashes (\) before them. All I want to do is make these chars appear without the slashes before them.

 

Thanks in advance :)

 

Like 0

Like

1 comments

Hello,

As for now, unfortunately, there is no possibility to use word formulas in compose with printables and our R&D team has a problem regarding this functionality and we hope that it will be updated in one of future versions of the application. 

 

As for now you can try using this marketplace application that can fit your needs https://marketplace.bpmonline.com/app/excel-reports-builder-bpmonline.

Show all comments

Hello,

 

I am willing to change publish button caption. any ideas how can we do this? I tried to override the module but in vain.

 

Like 0

Like

1 comments

Hello,

If you want to change the caption of the publish button then you need to create a replacing schema of BaseMessagePublisherPage and in it change the value of the PublishButtonCaption localizable string

 

Show all comments

I need to make it open a panel with Open Street Map on it but my code is not working, when I click on the button I added, it gets the loading screen but doesn't show anything and the console shows an error.

My Code:

{
    showMapContainer: function() {
		var mapsConfig = {
			mapsData: []
		};
 
		mapsConfig.mapsData.push(
			{
				address: "0.0, 0.0",
				content:"<h2>Check-In</h2>",
				gpsE: "0.0",
				gpsN: "0.0",
				isCoordsItem: true,
				useCurrentUserLocation: true
			}
		);
		MapsUtilities.open({
			mapsConfig: mapsConfig,
			scope: this
		});
	}
}

Error:

Like 1

Like

1 comments
Best reply

I solved it, I needed to add the GetMapsConfig in messages:

I solved it, I needed to add the GetMapsConfig in messages:

Show all comments

Hello,

 

I have a detail in which I have added a column from another table using the "diff" array. Please see below Code. I would like the "Link" column to get hyperlinked. Unfortunately, the code I added does not seem to add hyperlink.

Can someone help please?

getShareLink: function(value) {
 
                return {
                        url: value,
                        caption: value,
 
                };
        	},
        	onShareLinkClick: function(url) {
                if (url != null) {
                        window.open(url, "_blank", "height=" + this.get("WindowHeight") + ",width=" + 								this.get("WindowWidth"));
                        return false;
                }
   },
 
//diff array
{
	"operation": "insert",
	"name": "PsgDataGrid",
	"parentName": "Detail",
	"propertyName": "items",
	"index": 0,
	"values": {
			"itemType": Terrasoft.ViewItemType.GRID,
			"listedZebra": true,
			"collection": {"bindTo": "Collection"},
			"activeRow": {"bindTo": "ActiveRow"},
			"primaryColumnName": "Id",
			"isEmpty": {"bindTo": "IsGridEmpty"},
			"isLoading": {"bindTo": "IsGridLoading"},
			"multiSelect": {"bindTo": "MultiSelect"},
			"selectedRows": {"bindTo": "SelectedRows"},
			"sortColumn": {"bindTo": "sortColumn"},
			"sortColumnDirection": {"bindTo": "GridSortDirection"},
			"sortColumnIndex": {"bindTo": "SortColumnIndex"},
			"linkClick": {"bindTo": "linkClicked"},
			"type": "listed",
			"useListedLookupImages": true,
			"visible": {
				"bindTo": "isImageManagerDetailView",
				"bindConfig": {"converter": "getDataGridVisible"}
					},
					"listedConfig": {
						"name": "DataGridListedConfig",
						"items": [
							{
 
								"name": "Link",
								"bindTo": "Link",
								"position": {
									"column": 16,
									"colSpan": 8
								},
								"caption": Resources.localizableStrings.Link,
								"values":
								{
 
									"config": {
											"className": "Terrasoft.TextEdit",
											"linkclick": { bindTo: "onShareLinkClick"},
											"showValueAsLink": true,
											"enabled" : true,
											"href": {
											"bindTo": "Link",
											"bindConfig": {"converter": "getShareLink"}
										}
									}
								},
							}

 

Like 0

Like

8 comments

Hello,

If you want to make a text fields display as a hyperlink you need to add these parameters to the "values" part of the diff:

"showValueAsLink": true,

 "href": {

        "bindTo": "UsrLink",

        "bindConfig": {"converter": "getLinkFormat"}

 },

 "controlConfig": {

        "className": "Terrasoft.TextEdit",

        "linkclick": { bindTo: "onLinkClick"}

}

Note that "UsrLink" is the Code of the column.

And in the methods part add these methods:

            getLinkFormat: function(value) {

                return {

                    "url": value,

                    "caption": value

                };

            },

 

            onLinkClick: function(url) {

                var link = document.createElement("a");

                link.href = url;

                link.target = "_blank";

                document.body.appendChild(link);

                link.click();

                document.body.removeChild(link);

                return false;

            }

After this, your text should be displayed as a hyperlink.

Dmytro Vovchenko,

 

kindly see the code above. I have pasted the code with href, control config and showvalueaslink. It does not seem to work which is why I would like to check if the team can help here

Shivani Lakshman,

In that case, can you please show a screenshot of the detail so I can see how it looks like with values?

Sure



Shivani Lakshman,

I can see that you have two parameters named "values", inner and outer ones. Can you please try moving parameters "showValueAsLink", "bindConfig" and others to the outer "values" 

Dmytro Vovchenko,

I believe the outer values is for the detailgrid. I anyway tried outside the inner value and it still did not work. I am attaching the code

 define("FileDetailV2", ["FileDetailV2Resources", "PsgCurrentStorageImageConstants", "ViewUtilities", "ConfigurationConstants", "ConfigurationEnums", "ServiceHelper", "ProcessModuleUtilities","terrasoft", "BusinessRuleModule", "ImageListViewModel", "GridUtilitiesV2","ConfigurationGrid", "ConfigurationGridGenerator", "ConfigurationGridUtilities"],
function(Resources,PsgCurrentStorageImageConstants, ViewUtilities, ConfigurationConstants, ConfigurationEnums, ServiceHelper, ProcessModuleUtilities,Terrasoft, BusinessRuleModule) 
		{
	return {
		rules: {
		},
		attributes: {  
			"ShareButtonMenuItems": {
				dataValueType: Terrasoft.DataValueType.COLLECTION
			}
		},
 
		messages: {
		},
 		mixins: {
         ConfigurationGridUtilites: "Terrasoft.ConfigurationGridUtilities"
        },
		methods: {
 
				init: function() {
						this.callParent(arguments);
						this.loadSPConfiguration();
 
					},
 
 
 
			initLoadFilesQueryColumns: function(esq) {
				this.callParent(arguments);
				esq.addColumn("[PsgFileLink:PsgFileId].PsgCurrentStorage", "CurrentStorage");
				esq.addColumn("[PsgFileLink:PsgFileId].PsgShareableLink", "ShareLink");
 
			},
 
			getImageByCurrentStorage: function() {
 
				var imageUrl = PsgCurrentStorageImageConstants.Icons.DataBase;
				var storageType = this.get("CurrentStorage");
				if(storageType) {
					if(storageType.displayValue === "SharePoint") {
						imageUrl = PsgCurrentStorageImageConstants.Icons.Cloud;
					}
 
				}		
 
				return imageUrl;
			},
 
			decorateItem: function(item) {
				this.callParent(arguments);	
				item.columns["CurrentStorage"] = {
					caption: "",
					columnPath: "CurrentStorage",
					dataValueType: Terrasoft.DataValueType.LOOKUP,
					isLookup: true,
					name: "CurrentStorage"
				};
 
				item.defGetLookupImageUrlMethod = "getIconByCurrentStorage";
				item.getIconByCurrentStorage = this.getImageByCurrentStorage;
			},
 			addColumnLink: function(item, column) {
                this.callParent(arguments);
            },
 
			getShareLink: function(value) {
 
                return {
                        url: value,
                        caption: value,
 
                };
        	},
        	onShareLinkClick: function(url) {
                if (url != null) {
                        window.open(url, "_blank", "height=" + this.get("WindowHeight") + ",width=" + 								this.get("WindowWidth"));
                        return false;
                }
        	}
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "remove",
				"name": "DataGrid",
			},
 
			{
				"operation": "insert",
				"name": "PsgDataGrid",
				"parentName": "Detail",
				"propertyName": "items",
				"index": 0,
				"values": {
					"itemType": Terrasoft.ViewItemType.GRID,
					"listedZebra": true,
					"collection": {"bindTo": "Collection"},
					"activeRow": {"bindTo": "ActiveRow"},
					"primaryColumnName": "Id",
					"isEmpty": {"bindTo": "IsGridEmpty"},
					"isLoading": {"bindTo": "IsGridLoading"},
					"multiSelect": {"bindTo": "MultiSelect"},
					"selectedRows": {"bindTo": "SelectedRows"},
					"sortColumn": {"bindTo": "sortColumn"},
					"sortColumnDirection": {"bindTo": "GridSortDirection"},
					"sortColumnIndex": {"bindTo": "SortColumnIndex"},
					"linkClick": {"bindTo": "linkClicked"},
					"type": "listed",
					"useListedLookupImages": true,
					"visible": {
						"bindTo": "isImageManagerDetailView",
						"bindConfig": {"converter": "getDataGridVisible"}
					},
					"listedConfig": {
						"name": "DataGridListedConfig",
						"items": [
							{
								"name": "NameListedGridColumn",
								"bindTo": "Name",
								"position": {
									"column": 0,
									"colSpan": 4
								},
 
							},
							{
								"name": "VersionListedGridColumn",
								"bindTo": "Version",
								"position": {
									"column": 5,
									"colSpan": 2
								}
							},
							{
								"name": "CurrentStorage",
								"bindTo": "CurrentStorage",
								"position": {
									"column": 7,
									"colSpan": 6
								},
								"caption": Resources.localizableStrings.CurrentStorageColumnCaption,
 
							},
 
							{
								"name": "ShareLink",
								"bindTo": "ShareLink",
								"position": {
									"column": 13,
									"colSpan": 11
								},
								"caption": Resources.localizableStrings.Link,
								"values":
								{
											"showValueAsLink": "true",
											//"enabled" : true,
											"href": {
											"bindTo": "Link",
											"bindConfig": {"converter": "getLink"},
											},
 
											"controlconfig": {
												"className": "Terrasoft.TextEdit",
												"linkclick": { bindTo: "onShareLinkClick"},
 
										},
										"viewType":"url"
									}
 
							}
						]
					},
					"tiledConfig": {
						"name": "DataGridTiledConfig",
						"grid": {
							"columns": 24,
							"rows": 3
						},
						"items": [
 
						]
					},
					"linkClick": {"bindTo": "linkClicked"}
				}
			},
 
			{
					"operation": "insert",
					"parentName": "Header",
					"propertyName": "items",
					"name": "Name",
					"values": {
						"generator": "HtmlControlGeneratorV2.generateHtmlControl",
						"htmlContent": {
							"bindTo": "Name"
						},
						"classes": {
							"wrapClass": ["t-label"]
						}
					}
				},
			{
				"operation": "insert",
				"name": "AddToCloudButton",
				"parentName": "Detail",
				"propertyName": "tools",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"tag": "addFileButton",
					"fileUpload": true,
					"filesSelected": {"bindTo": "onFileSelect"},
					"click": {"bindTo": "onAddFileClick"},
					"visible": {"bindTo": "getAddToCloudButtonVisible"},
					"imageConfig": {"bindTo": "Resources.Images.AddToCloudButtonImage"},
					 "hint": { "bindTo": "Resources.Strings.AddToCloudToolTip" } ,
				}
			},
			{
				"operation": "merge",
				"name": "AddRecordButton",
				"parentName": "Detail",
				"propertyName": "tools",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"tag": "addFileButton",
					"fileUpload": true,
					"filesSelected": {"bindTo": "onFileSelect"},
					"click": {"bindTo": "onAddFileClick"},
					"visible": {"bindTo": "getAddRecordButtonVisible"},
					"imageConfig": {"bindTo": "Resources.Images.AddButtonImage"}
				}
			},
			{
				"operation": "insert",
				"name": "UploadToSPRetry",
				"parentName": "Detail",
				"propertyName": "tools",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"click": {"bindTo": "uploadToSPRetry"},
					"visible": {"bindTo": "uploadToSPRetryButtonVisible"},
					"caption": Resources.localizableStrings.UploadToSPRetryButtonCaption
				}
			},
 
 
			]
		/**SCHEMA_DIFF*/
	};
});

for you to look at. Please let me know your suggestions.

Shivani Lakshman,

With the same issue on my end.

Federico Buffa ?,

 

The column that I wanted to hyperlink was from another table. The solution that was provided is as follows

Please try with the specific column that you want to hyperlink with the following method

addColumnLink: function(item, column) {

                const columnPath = column.columnPath;

                if (columnPath ==="[PsgFileLink:PsgFileId].PsgShareableLink") {

                    column.columnPath = "ShareLink";

                    this.callParent(arguments);

                } else {

                    this.callParent(arguments);

                }

            },

Show all comments

Hi All,

 

I am not able to replicate https://academy.creatio.com/documents/technic-sdk/7-15/how-add-auto-numbering-edit-page-field?_ga=2.112080903.283211749.1623923008-1596851256.1623923008 it successfully on our custom package. Client-side implementation is working as expected. If we try the server side, it is not working. Could anyone please help us with what I am missing? Or is there anything specific we need to do? Even I tried following https://community.creatio.com/questions/auto-numbering-server-side-doesnt-work and could double check on the parameters mentioned.

 

Image Reference

https://ibb.co/tBcFN8Y

https://ibb.co/CMQ29nV

https://ibb.co/cDCBbFC

https://ibb.co/T12tWK7

 

Thanks in advance.

Like 0

Like

3 comments

In addition to the above, I could see the source code section on the downloaded https://academy.creatio.com/docs/node/2311 package with many autogenerated function related to event triggers. If I check my custom object it only has getter and setter for each columns.

To autogenerate the source code I have tried 

1. Generate schemas

2. Publish

3. Complie

All options I have tried but Source code is not generated.

 

 

Thanks

From the screenshots it look like the column you're storing the number in is "UsrCode", however the screenshots show you're attempting to set that in a column named "Code".

Change the line that says:

Entity.SetColumnValue("Code", UserTask1.ResultCode);

To this:

Entity.SetColumnValue("UsrCode", UserTask1.ResultCode);

Secondly, it's unlikely that the name of the UserTask component (the element titled "Generate ordinal number" in your screenshot) is really just UserTask1 (unless you've changed it to that). To find it's name, select that element, then click the three-dot button on the top of the properties on the right and switch to advanced mode to see the name. Then change the "UserTask1" part of the code in both script tasks to that name (it's likely something like UserTask_ followed by random numbers/letters)

Ryan

Ryan Farley,

 

Thanks for your reply. I have double checked my code and I have changed it into "UserTask1" also I have shown 2 examples where I am trying to follow the tutorial with property value as "Code" and my custom section with the property as "UsrCodee".

 

Also, I see this as because of missing source code details for my custom section than the sample SDK which was referenced in the document.

 

Thanks,

Altaf Hussian

 

Show all comments

Hi,

 

Once the activity is created by DCM, I want to show only the activity which is assigned to the current user. Any lead woul help.

 

Regards,

Sourav

Like 1

Like

3 comments

Hello,

 

You can create a business process that grants read permission to an activity only to its owner.

 

More about the business process element "Change access rights":

https://academy.creatio.com/docs/user/bpm_tools/process_elements_refere…

Cherednichenko Nikita,

 

I have already tried this approach. Although it works perfectly fine for Activity section, but under DCM it still shows the Activity which I want to show or hide conditionally.

 

Regards,

Sourav

Sourav Kumar Samal,

 

If you remove read permissions for other users, then only the responsible user will be able to see this record.

Show all comments

Hello,

 

I need to make a button visible based on a few conditions

1. If current user contact record has a lookup value of "Approver"

and

2. If account record of the current user contact has lookup value "Enterprise"

 

Since there are 2 tables to be queried, I understand I need to use callbacks and chaining. This does not seem to work well for me. I have also tried passing a callback function within a callback function, but still its not working well. Can someone please give an example of multiple callbacks?

 

Thanks

Like 1

Like

2 comments

There's no need for the multiple callbacks since this can be done in a single ESQ query. For example, the ESQ below retrieves both the current user's Type value as well as the current user's account Type value in the same call.

var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
    rootSchemaName: "Contact"
});
 
esq.addColumn("Type");
esq.addColumn("Account.Type", "AccountType");
 
esq.getEntity(Terrasoft.SysValue.CURRENT_USER_CONTACT.value, function (result) {
    if (result.success) {
        var conType = result.entity.values.Type,
            accType = result.entity.values.AccountType;
 
        if ((conType &amp;&amp; conType.displayValue == "Approver")
            &amp;&amp; (accType &amp;&amp; accType.displayValue == "Enterprise")) {
            // do something
        }
    }
}, this);

However, to nest a ESQ in a callback of another ESQ it would look like this: 

var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
	rootSchemaName: "Contact"
});
 
esq.addColumn("Type");
esq.addColumn("Account");
 
esq.getEntity(Terrasoft.SysValue.CURRENT_USER_CONTACT.value, function (result) {
    if (result.success) {
        var conType = result.entity.values.Type,
            account = result.entity.values.Account;
        if (conType &amp;&amp; conType.displayValue == "Approver") {
            var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
                rootSchemaName: "Account"
            });
 
            esq.addColumn("Type");
 
            esq.getEntity(account.value, function (result) {
                if (result.success) {
                    var accType = result.entity.values.Type;
                    if (accType &amp;&amp; accType.displayValue == "Enterprise") {
                        // do something
                    }
                }
            }, this);
        }
    }
}, this);

Ryan

Show all comments