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

How could I customize the Call action in the action panel to show Contacts from respective Account in Action panel of Account, Opportunity, Lead pages?

 

Like 0

Like

0 comments
Show all comments

Dear,

I m trying to copy an email Model HTML content into a section textarea.

Here's my code:

onUsrModeleIdChange: function() {
 
	var ModeleId = this.get("UsrModeleId").value;
 
	var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
		rootSchemaName: "EmailTemplate"
	});
	esq.addColumn("Body");
 
	esq.filters.add("IdFilter", esq.createColumnFilterWithParameter(
		Terrasoft.ComparisonType.EQUAL, "Id", ModeleId));
 
	esq.getEntity(ModeleId, function(result) {
 
		var BodyContent=result.entity.get("Body");
 
		this.set("Corps", BodyContent);
	});
},

I get the BodyContent variable, but the this.set comes out in error:

I don't understand why the this.set does not works.

Is it because the field is an textArea ?

Thank you !

Nicolas

 

Like 0

Like

3 comments
Best reply

As an FYI, you can retain the scope by passing this as the final parameter to the ESQ getEntity. 

esq.getEntity(ModeleId, function(result) {
    var BodyContent=result.entity.get("Body");
    this.set("Corps", BodyContent);
}, this); // note 'this' passed as final parameter

This is also the case with getEntityCollection:

esq.getEntityCollection(function(result) {
    // scope retains 'this' context
}, this);

Ryan

context error...

i used: var scope = this; to reach the object

onUsrModeleIdChange: function() {
	var scope = this;
 
	var ModeleId = this.get("UsrModeleId").value;
 
	var esq = this.Ext.create("Terrasoft.EntitySchemaQuery", {
		rootSchemaName: "EmailTemplate"
	});
	esq.addColumn("Body");
 
	esq.filters.add("IdFilter", esq.createColumnFilterWithParameter(
		Terrasoft.ComparisonType.EQUAL, "Id", ModeleId));
 
	esq.getEntity(ModeleId, function(result) {
 
		var BodyContent=result.entity.get("Body");
 
		scope.set("Corps", BodyContent);
		scope.save();
	});
},

 

As an FYI, you can retain the scope by passing this as the final parameter to the ESQ getEntity. 

esq.getEntity(ModeleId, function(result) {
    var BodyContent=result.entity.get("Body");
    this.set("Corps", BodyContent);
}, this); // note 'this' passed as final parameter

This is also the case with getEntityCollection:

esq.getEntityCollection(function(result) {
    // scope retains 'this' context
}, this);

Ryan

Ryan Farley,

Hello Ryan and thank you for the reply !

Do you know how i can retrieve the message template Body in french ?

Ryan Farley writes:

var BodyContent=result.entity.get("Body"); //in french ?

Show all comments

Hi,

 

Is there a way to disenroll a contact from a campaign temporarily? The idea is to have the ability to disenroll a contact from a campaign (manually) and enroll them back at a later point. At that time, the contact should continue the campaign from were it previously stopped.

 

Like 0

Like

1 comments

I was able to achieve this with the help of 2 static folders (enroll and disenroll) specific for each campaign. I then added filtering condition to each conditional flow element to see if the contact is present in disenroll folder. (if yes, the contact will not proceed through the campaign). When the contact needs to be enrolled back, it is removed from the disenroll folder. Hence, the contact will proceed through the campaign as the filter condition is no longer met.

Show all comments

How can we show the Delete Menu Item for a custom detail only for a certain role like System Administrator?

 

Like 0

Like

2 comments

Hello, 

you can restrict deletion rights with object permissions.



The following instructions can help you to achieve the result you are looking for: Object operation permissions

Thank you Kalymbet!

With this option, the Delete Item would still be "visible" to all users (although only certain roles will have permission to perform deletion as defined in object permissions).

Any way to display the option only for specific roles?

Show all comments

Dear Creatio community,

 

we are looking for a way for adding a position number to product positions in invoices and orders.

Is there any out of the box solution that we don't know of or did you implement your own logic for this issue?

 

Thanks a lot

Markus

Like 0

Like

2 comments
Best reply

Hello Markus,



This feature is available in 8.x sections and pages OOTB in Application Hub. You should create an Application and add sections and pages based on existing objects. The "list" tool will help you to achieve the needed list view.

 

In the 7.x pages - there is no no-code solution, you would need development to add numeration to OrderPageV2 and InvoicePageV2 details.

 

I hope my answer was useful for you!

 

Best Regards,

Dan

Hello Markus,



This feature is available in 8.x sections and pages OOTB in Application Hub. You should create an Application and add sections and pages based on existing objects. The "list" tool will help you to achieve the needed list view.

 

In the 7.x pages - there is no no-code solution, you would need development to add numeration to OrderPageV2 and InvoicePageV2 details.

 

I hope my answer was useful for you!

 

Best Regards,

Dan

Thank you very much! 

We will test it out :)

Show all comments

We are using the Advanced list setup for Creatio. Is there a way to utilize the columns already setup on a folder to copy when creating a new folder?

What’s happening is if you copy a folder and go to edit the columns, the columns are blank and you have to start from scratch to setup the columns you want to see in the folder.  Is there a way to start with the columns already set on a folder?

Like 0

Like

2 comments

Hello Melanie,

 

Thank you for your question. The add-on does not currently support this function. You will need to set up columns for the copied folder from scratch. However, I have forwarded your feedback to the developer in charge, and, hopefully, we'll have more information soon.

Thank you for your patience.

Hello, Is there any update that will allow users to utilize the columns already setup on a folder to copy when creating a new folder?

Show all comments

Hello,

 

I have an inherited Schema in Custom package. There are no changes of functionality there, but there are possible changes in LocalizableStrings.

How can I see, what LocalizableStrings was changes in Page Schema?

 

Thank you!

Like 0

Like

2 comments

Hello,

You can check the LocalizableStrings in the config section.

To do this, you need to open your schema and check the Localizable strings tab:

Cherednichenko Nikita,

Hello, I understand how to check the LocalizableStrings in the schema.



But there are a lot of them. So, how to find, which one was changed?



Thank you.

Vladimir

Show all comments

не розумію де можна обрати формулу, для побудови лічильника?

Like 0

Like

0 comments
Show all comments