Question

Which IIS settings should be edited to change the session duration? What values are set now?

Answer

Select the "Advanced settings" option on the right part of the window.

Edit the "Connection time-out" value in the settings.

 

Like 0

Like

Share

0 comments
Show all comments

Question

How can I pass infromation from ModalBox?

Answer

1) Crreate a MoalBox page - "Model schema of the page view" without specifying the parent schema:

define("UsrMyModalPage", ["ModalBox"], function(ModalBox) {
	return {
		attributes: {
			"TestText": {
				dataValueType: Terrasoft.DataValueType.TEXT,
				type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN
			}
		},
		messages: {
			"DataFromModal": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			}
		},
		methods: {
			init: function(callback, scope) {
				this.callParent(arguments);
			},
			onRender: function() {
			},
			onCloseButtonClick: function() {
				this.sandbox.publish("DataFromModal", { test: this.get("TestText") }, [this.sandbox.id]);
				ModalBox.close();
			}
		},
		diff: [
			{
				"operation": "insert",
				"name": "MyContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTAINER,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyContainer",
				"propertyName": "items",
				"name": "MyGridContainer",
				"values": {
					"itemType": Terrasoft.ViewItemType.GRID_LAYOUT,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyGridContainer",
				"propertyName": "items",
				"name": "TestText",
				"values": {
					"bindTo": "TestText",
					"caption": "Test text",
					"layout": {"column": 0, "row": 0, "colSpan": 10}
				}
			},
			{
				"operation": "insert",
				"parentName": "MyGridContainer",
				"name": "CloseButton",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"style": Terrasoft.controls.ButtonEnums.style.BLUE,
					"click": {bindTo: "onCloseButtonClick"},
					"markerValue": "CloseButton",
					"caption": "OK",
					"layout": { "column": 0, "row": 1, "colSpan": 3 }
				}
			}
		]
	};
});

2) Create the ModalBox module - "Module" with a single dependancy from the above mentioned page.

define("UsrMyModalModule", ["ModalBox", "BaseSchemaModuleV2"],
		function(ModalBox) {
	Ext.define("Terrasoft.configuration.UsrMyModalModule", {
		extend: "Terrasoft.BaseSchemaModule",
		alternateClassName: "Terrasoft.UsrMyModalModule",
		/** * @inheritDoc Terrasoft.BaseSchemaModule#generateViewContainerId * @overridden */
		generateViewContainerId: false,
		/** * @inheritDoc Terrasoft.BaseSchemaModule#initSchemaName * @overridden */
		initSchemaName: function() {
			this.schemaName = "UsrMyModalPage";
		},
		/** * @inheritDoc Terrasoft.BaseSchemaModule#initHistoryState * @overridden */
		initHistoryState: Terrasoft.emptyFn,
	});
	return Terrasoft.UsrMyModalModule;
});

3) Create a replacing edit page for adding the created ModalBox:

define("ContactPageV2", ["ContactPageV2Resources", "GeneralDetails", "ModalBox"],
function(resources, GeneralDetails, ModalBox) {
	return {
		entitySchemaName: "Contact",
		messages: {
			"DataFromModal": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			}
		},
		details: /**SCHEMA_DETAILS*/{
		}/**SCHEMA_DETAILS*/,
		methods: {
			subscribeSandboxEvents: function() {
				this.callParent(arguments);
				this.sandbox.subscribe("DataFromModal", function(arg) {
					console.log("msg from modal: " + arg.test);
				}, this, [this.sandbox.id + "_" + "UsrMyModalModule"]);
			},
			loadMyModal: function() {
				var sandbox = this.sandbox;
				var config = {
					heightPixels: 420,
					widthPixels: 750
				};
				var moduleName = "UsrMyModalModule";
				var moduleId = sandbox.id + "_" + moduleName;
				var renderTo = ModalBox.show(config, function() {
					sandbox.unloadModule(moduleId, renderTo);
				});
				sandbox.loadModule(moduleName, {
					id: moduleId,
					renderTo: renderTo
				});
			},
			onMyClick: function() {
				this.loadMyModal();
			},
			onEntityInitialized: function() {
				this.callParent(arguments);
			}
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"parentName": "CombinedModeActionButtonsCardContainer",
				"propertyName": "items",
				"name": "MainContactButton",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": "пыщь-пыщь",
					"click": {"bindTo": "onMyClick"}
				}
			}
		]/**SCHEMA_DIFF*/
	};
});

 

Like 0

Like

Share

7 comments

Hi do you have example to do the other way around, passing information from contact page to modal box?

Fulgen Ninofranco,

Please find the example below, where on email field change, the modal box will display mobile phone of current contact.

attributes: {
    "Email": {
	dependencies: [
	    {
		columns: ["Email"],
		methodName: "showMobilePhone"
	    }
	]
    }
},
methods: {
    showMobilePhone: function() {
      var mobilePhone = this.get("MobilePhone");
      this.showInformationDialog("Is contact mobile phone " + mobilePhone + " correct?");
    }
}

In case you need to retrieve value for other contact, not the current one, please consider using ESQ i to the Contact object in the method. 

showInformationDialog method can display strings as well as values of localizable strings.

Regards,

Anastasia

S.Kobizka/Anastasia,

I am trying the code in this post to create a modal dialog. I've used the code exactly as posted in this article, without changes, for this test. The ModalBox dialog shows, the client schemas UsrMyModalModule and UsrMyModalPage both load and hit my breakpoint, but the elements in the diff of UsrMyModalPage do not show, the modal dialog is empty. I assume it is possibly because of the type of schema I chose for the UsrMyModalPage. The article says:

Create a MoalBox page - "Model schema of the page view" without specifying the parent schema

What exactly is a "Model schema of the page view". I've tried as a Module, as a "Schema of the Edit Page view Model" (which produces an error about "schema identifier not found" when saving), and also as a Module with "BaseModalBoxPage" as the parent, all with the same results.

Any ideas what I might be doing wrong? Or can you clarify what "Model schema of the page view" is exactly?

Thanks!

Ryan

Ryan Farley,

Hello Ryan,



In order to create a modal box you need:



1. Create a  "Schema of the Edit Page View Model" https://prnt.sc/pxaga3.

Parent object - "Base modal box page schema"  https://prnt.sc/pxagv1

2. Code of the modal box:

define("UsrSampleModalBox", [], function() {
	return {
		attributes: {
			"TestText": {
				dataValueType: Terrasoft.DataValueType.TEXT,
				type: Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN
			}
		},
		messages: {
		},
		methods: {
			init: function(callback, scope) {
				this.callParent(arguments);
				this.usrInitModuleInfo();
			},
			usrInitModuleInfo: function() {
				var moduleInfo = this.get("moduleInfo");
				this.set("TestText", moduleInfo.TestText);
			},
			getHeader: function() {
				return this.get("Resources.Strings.PageCaption");
			}
		},
		//Insert already existed Iframe
		diff: [
			{
				"operation": "insert",
				"name": "MyContainer",
				"parentName": "CardContentContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTAINER,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyContainer",
				"propertyName": "items",
				"name": "MyGridContainer",
				"values": {
					"itemType": Terrasoft.ViewItemType.GRID_LAYOUT,
					"items": []
				}
			},
			{
				"operation": "insert",
				"parentName": "MyGridContainer",
				"propertyName": "items",
				"name": "TestText",
				"values": {
					"bindTo": "TestText",
					"caption": "Test text",
					"layout": {"column": 0, "row": 0, "colSpan": 20}
				}
			}
		]
	};
});

3. Call a modal box from the page. I used Account page as an example:

define("AccountPageV2", ["UsrSampleModalBox"], function() {
	return {
		entitySchemaName: "Account",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		methods: {
			getActions: function() {
				var actionMenuItems = this.callParent(arguments);
				this.addModalBoxMenuItem(actionMenuItems);
				return actionMenuItems;
			},
			addModalBoxMenuItem	: function(actionMenuItems) {
				actionMenuItems.addItem(this.getButtonMenuItem({
					"Caption": {"bindTo": "Resources.Strings.ModalBoxMenuItemCaption"},
					"Tag": "openModalBox"
				}));
			},
			openModalBox: function() {
				this.sandbox.loadModule("ModalBoxSchemaModule", {
					id: this.sandbox.id + "_UsrSampleModalBox",
					instanceConfig: {
						moduleInfo: {
							schemaName: "UsrSampleModalBox",
							TestText: "sample parameter value"
						},
						initialSize: {
							width: 800,
							height: 450
						}
					}
				});
			}
		},
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
	};
});

4. Results:

https://prnt.sc/pxai25

https://prnt.sc/pxai8j





Please note, that sample also shows how you can pass parameters and work with them. Parameter  - TestText, and initialSize with size parameters of modal box.

 

 

 

 

Dmytro Smishchenko,

 

Is there any way to pass a callback function to the modal box which can be executed when a button is pressed, e.g. a "save message" button which saves the current record and executes a business process?



Thanks,

Harvey

Hello Harvey, 



Please check this screenshot to see how the ModalBox's "show" method works: 



You can call a callback- function which will be called after closing the modal box in this way:



ModalBox.show(modalBoxConfig, function() { // the code here will work once the box is closed }, this);



Kind regards,

Roman

 

Roman Brown,

 

Thanks Roman, our use case required that we have a different callback for just closing the ModalBox than pressing the button of interest on the ModalBox (a 'save' button) so we ended up slightly modifying the Business Process and calling it from the ModalBox code using the ProcessModuleUtilities module, but will keep this in mind for future.

 

Thanks,

Harvey

Show all comments

Steps to enable Dcm for portal users:

  1. Create replacing objects "SysDcmSettings", "Dcm library (view)", "Section object", "Case status changed actions" and enable access rights by Operations

  2. Add roles "All employees" and "All portal users" to object permissions for the replacing objects from item 1

  3. Add objects from item 1 into lookup "List of objects available for portal users"

  4. Execute sql-script on your environmemnt

    MERGE INTO SysDcmSettings t1 USING (SELECT 1 id) t2 ON (t1.SysModuleEntityId = '355ec546-d278-4d4b-8bf5-a346b4ca3579')
    WHEN NOT MATCHED THEN INSERT (SysModuleEntityId, StageColumnUId, Filters, DefaultSchemaUId)
    VALUES ('355ec546-d278-4d4b-8bf5-a346b4ca3579', 'a71adaea-3464-4dee-bb4f-c7a535450ad7', N'[{"columnUId":null}]', '3c7d3f4f-a553-4717-909e-6ca5dd6a042f');

     

Like 0

Like

Share

0 comments
Show all comments

Question

How can I implement tips on the [Connected to] detail?

Answer

The tips for the [Connected to] detail are formed based on the onGetPageTips() method that must be called in the BasePageV2 schema:

To add a custom tip in the [Activities] section, you need to:

  1. replace АctivityPageV2
  2. add localizable string
  3. override the onGetPageTips() method

In the base configuration you can see an example of code in the ContactPageV2 (UIv2) schema:

{
    "operation": "insert",
    "parentName": "Header",
    "propertyName": "items",
    "name": "Owner",
    "values": {
        "layout": {"column": 11, "row": 2, "colSpan": 13},
        "tip": {
            "content": {"bindTo": "Resources.Strings.OwnerTip"}
        }
    }
},

 

Like 0

Like

Share

0 comments
Show all comments

Question

Where can I find information on implementing messages between details via sandbox? 

Answer

Examples of implementing massage exchange between details via sandbox:

1) AccountBillingInfoDetailV2:

define("AccountBillingInfoDetailV2", [], function() {
	return {
		entitySchemaName: "AccountBillingInfo",
		details: /**SCHEMA_DETAILS*/{
		}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "merge",
				"name": "DataGrid",
				"values": {
					"selectRow": {
						"bindTo": "rowSelected"
					}
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			rowSelected: function() {
				this.sandbox.publish("RowSelectedInFirstDetail", { test: "param anything" }, [this.sandbox.id]);
				console.log("rowSelected in first detail...");
			}
		},
		messages: {
			"RowSelectedInFirstDetail": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.PUBLISH
			}
		}
	};
});

2) AccountAddressDetailV2:

define("AccountAddressDetailV2", [], function() {
	return {
		entitySchemaName: "AccountAddress",
		details: /**SCHEMA_DETAILS*/{
		}/**SCHEMA_DETAILS*/,
		diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/,
		methods: {
			init: function() {
				this.sandbox.subscribe("RowSelectedInFirstDetail", function(arg) {
					console.log("test " + arg.test);
				}, this, [this.getSenderSandboxId()]);
			},
			getSenderSandboxId: function() {
				return this.sandbox.id.replace("_AccountAddress", "_AccountBillingInfo");
			}
		},
		messages: {
			"RowSelectedInFirstDetail": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.SUBSCRIBE
			}
		}
	};
});

 

Like 0

Like

Share

2 comments

I have an error coming from the arg value:

Unhandled Promise rejection: arg is not defined ; Zone: <root> ; Task: Promise.then ; Value: ReferenceError: arg is not defined

 

Where is that coming from? Why do I get it?

Hello Maria,

 

Could you please provide us the full code that you have implemented? Also, as long as I understand this error is being shown in the console. Does it point exactly to this line 

console.log("test " + arg.test); 

?

And what are the steps that you follow to reproduce this problem and receive this error?

 

Best regards,

Dariy

Show all comments

Case

An arbitrary object, say, an account, has parameter 1, parameter 2 and parameter 3. The object has a detail displaying records of this object type, e.g., accounts that meet the condition "parameter 1 + parameter 2 match the primary record", "parameter 2 + parameter 3 match the primary record", "parameter 1 + parameter 3 match the primary record". The detail enables filtering by several columns. How can I enable UNION, i.e., "summarize" several independent sets of such filters?

Solution

Let's assume we have the following population of the account table:

As per the above description, the page and detail will be populated as follows:

1) The first variant of detial population:

2) The secon variant of detail population. Maybe combining values was meant, in this case the detail and page will be as follows:

"The detail enables filtering by several columns. How can I enable UNION, i.e., "summarize" several independent sets of such filters?"

If the first variant of detail population was meant, then filterGroup in the filtering method on the page will look as follows:

If the second variant of detail population was meant, then filterGroup in the filtering method on the page will look as follows:

Note the mistake in adding groups - the keys are not specified. The correct adding of groups is displayed below:

filterGroup.add(1”, filterGroup1);
filterGroup.add(2”, filterGroup2);
filterGroup.add(3”, filterGroup3);

 

Like 0

Like

Share

0 comments
Show all comments

Question

How can I create my own control element?

Answer

To create a custom control element:

1. Create a module - class of the control element:

Ext.ns("Terrasoft");
/** * @class Terrasoft.controls.UsrMyControl * Control element class for display */
Ext.define("Terrasoft.controls.UsrMyControl", {
	extend: "Terrasoft.Component",
	alternateClassName: "Terrasoft.UsrMyControl",
	mixins: {
	},
	myParam: "",
	/** * @inheritdoc Terrasoft.Component#tpl * @protected * @overridden */
	tpl: [
		/*jshint white:false */
		"<div id='{id}-usr-my-control' class='{wrapClass}'>",
		"{myParam} test-test-test",
		"</div>"
		/*jshint white:true */
	],
	getTplData: function() {
		var tplData = this.callParent(arguments);
		tplData.myParam = this.myParam;
		this.updateSelectors(tplData);
		return tplData;
	},
	/** * @inheritDoc Terrasoft.Component#init * @protected * @overridden */
	init: function() {
		this.callParent(arguments);
		this.addEvents(
			"myMethod"
		);
	},
	/** * @inheritDoc Terrasoft.Component#constructor * @overridden */
	constructor: function() {
		this.callParent(arguments);
	},
 
	updateSelectors: function(tplData) {
		var id = tplData.id;
		var baseIdSuffix = "-usr-my-control";
		var selectors = this.selectors = {};
		selectors.wrapEl = "#" + id + baseIdSuffix;
		return selectors;
	},
	/** * Subscription to element events of the control element */
	initDomEvents: function() {
		this.callParent(arguments);
		var wrapEl = this.getWrapEl();
		if (wrapEl) {
			wrapEl.on("click", this.onClick, this);
		}
	},
	/** * "click" event handler on the ptimary element * @param event */
	onClick: function(event) {
		event.stopEvent();
		this.fireEvent("myMethod", this);
	},
	/** * Returns configuration of connection to the model. Implements the mixin interface {@link Terrasoft.Bindable}. * @overridden */
	getBindConfig: function() {
		var parentBindConfig = this.callParent(arguments);
		var bindConfig = {
			myParam: {
				changeMethod: "setMyParam"
			}
		};
		Ext.apply(bindConfig, parentBindConfig);
		return bindConfig;
	},
 
	setMyParam: function(val) {
		this.myParam = val || this.myParam;
		if (this.allowRerender()) {
			this.reRender();
		}
	},
	/** * @overridden * @inheritdoc Terrasoft.Component#destroy */
	onDestroy: function() {
		var wrapEl = this.getWrapEl();
		if (wrapEl) {
			wrapEl.un("myMethod", this.onClick, this);
		}
		this.callParent(arguments);
	},
	/** * Sets the flag value to "read only" * @param {Boolean} readonly The flag value "read only". If true - the control element is set to *  "read only" mode, if false - the operating mode of the control element */
	setReadonly: function(readonly) {
		if (this.readonly === readonly) {
			return;
		}
		this.readonly = readonly;
		if (this.allowRerender()) {
			this.reRender();
		}
	}
});

2. Create a generator module of the control element:

define("UsrMyControlGenerator", ["UsrMyControlGeneratorResources", "terrasoft", "ext-base", "UsrMyControl"],
		function(resources) {
	var UsrMyControlGenerator = Ext.define("Terrasoft.configuration.UsrMyControlGenerator", {
		extend: "Terrasoft.ViewGenerator",
		alternateClassName: "Terrasoft.UsrMyControlGenerator",
		generateUsrMyControl: function(config) {
			var usrMyControl = {
				className: "Terrasoft.UsrMyControl",
				id: config.name + "UsrMyControl",
				selectors: {wrapEl: "#" + config.name + "UsrMyControl"},
				myParam: {bindTo: config.getMyParam},
				myMethod: {bindTo: config.myMethod}
			};
			if (!Ext.isEmpty(config.wrapClassName)) {
				usrMyControl.classes = {
					wrapClassName: config.wrapClassName
				};
			}
			return usrMyControl;
		}
	});
	return Ext.create(UsrMyControlGenerator);
});

3. Add the custom control element to the diff property of the schema:

define("CasePage", ["CasePageResources", "terrasoft", "UsrMyControlGenerator", "UsrMyControl"],
	function(resources, Terrasoft) {
	return {
		entitySchemaName: "Case",
		details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		attributes: {
			"Test": {
				"dataValueType": Terrasoft.DataValueType.TEXT,
				"type": Terrasoft.ViewModelColumnType.VIRTUAL_COLUMN,
				"value": "123"
			}
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"parentName": "SolutionTab_gridLayout",
				"name": "UsrTest",
				"propertyName": "items",
				"values": {
					"className": "Terrasoft.UsrMyControl",
					"layout": { "colSpan": 24, "rowSpan": 1, "column": 0, "row": 4 },
					"generator": "UsrMyControlGenerator.generateUsrMyControl",
					"visible": true,
					"getMyParam": "getMyParam",
					"myMethod": "myMethod"
				}
			}
		]/**SCHEMA_DIFF*/,
		methods: {
			onEntityInitialized: function() {
				this.callParent(arguments);
				// just for debug:
				document.scope = this;
			},
			getMyParam: function() {
				return this.get("Test");
			},
			myMethod: function() {
				var oldTest = this.get("Test");
				this.set("Test", oldTest + "!");
			}
		},
		rules: {}
	};
});

Soecify UsrMyControl and UsrMyControlGenerator modules in schema dependancies.

Like 0

Like

Share

0 comments
Show all comments

Case

I created a UsrCustomHelper module where I placed my code. When I connect this module to the  replacing schema of the contract section (ContractPageV2 ). When I try to call it, bpm'online displays an error that the module is not found.

Solution

To ensure correct operation, connect the module by the name it has in the system. You use CustomHelper in your code, while you need to use UsrCustomHelper, which is the real name of your module.

Thus, in the define section of your module, make the following changes:

define("UsrCustomHelper", [], function() {

In the define section of the schema, where you want to use the module, make the following changes:

define("ContractPageV2", ["ContractPageV2Resources", "BusinessRuleModule", "GeneralDetails", "Terrasoft", "UsrCustomHelper"],
    function(resources, BusinessRuleModule, GeneralDetails, Terrasoft, CustomHelper) {

Leave CustomHelper as the name of the incoming parameter if you wish, in this case the call of module methods will remian unchanged:

this.set("Number", CustomHelper.toTranslit(ownerAbb).toUpperCase()+response);

 

Like 0

Like

Share

0 comments
Show all comments

Case

An arbitrary object, say, an account, has parameter 1, parameter 2 and parameter 3. The object has a detail displaying records of this object type, e.g., accounts that meet the condition "parameter 1 + parameter 2 match the primary record", "parameter 2 + parameter 3 match the primary record", "parameter 1 + parameter 3 match the primary record". The detail enables filtering by several columns. How can I enable UNION, i.e., "summarize" several independent sets of such filters?

Solution

Use the filterGroup class for advanced filtering (you can implement filtering of any complexity).

You can see the case implementation in the AccountPageV2 schema (the UIv2 package) - the emailDetailFilter  filter.

Implement a custom method that contains "filterGroup" (e.g. "emailDetailFilter") and add this method to the entity.

filterGroup has "AND" condition by default. If you need to use "OR" condition, add the following property:

filterGroup.logicalOperation = Terrasoft.LogicalOperatorType.OR

You can find an example below:

Like 1

Like

Share

0 comments
Show all comments

Question

How can I add a web-type field (as the one in the [Communication options] detail) that would open in a new tab when I click it?

Answer

To turm a usual text field into a web link, develop the diff  property of this field with the following code:

{
    "operation": "insert",
    "name": "AdditionalExpenses",
    "values": {
 
        // -->
        "showValueAsLink": true,
        "controlConfig": {
            "enabled": true,
            "href": {
                "bindTo": "getAdditionalExpensesLink"
            },
            "linkclick": {
                "bindTo": "onExternalLinkClick"
            }
        },
        // <--
 
        "layout": {
            "colSpan": 12,
            "rowSpan": 1,
            "column": 0,
            "row": 3,
            "layoutName": "Tab07720f4eTabLabelGridLayout691629ea"
        },
        "labelConfig": {},
        "enabled": true,
        "bindTo": "AdditionalExpenses"
    },
    "parentName": "Tab07720f4eTabLabelGridLayout691629ea",
    "propertyName": "items",
    "index": 5
},

Add the following code to the methods property:

methods: {
 
    getAdditionalExpensesLink: function() {
        return this.getLink(this.get("AdditionalExpenses"));
    },
    onExternalLinkClick: function() {
        return;
    },
    getLink: function(value) {
        if (Terrasoft.isUrl(value)) {
            return {
                url: value,
                caption: value
            };
        }
    }
},

After this, the field becomes a link if it is specified in the correct web format or copied from browser. If you click the "Open in a new tab" option from the context menu, it will be opened in a new tab, if you left-click it - it will open in the current tab:

To open the link in a new window, develop the onExternalLinkClick() method:

onExternalLinkClick: function() {
    var value = this.get("AdditionalExpenses");
    if (!Ext.isEmpty(value)) {
        window.open(value, "_blank");
    }
    return false;
},

 

Like 1

Like

Share

0 comments
Show all comments