TRYING TO DISPLAY DETAIL IN A MODAL

Hello.

Question: Is it not possible to add Virtual Detail in Modal?

I tried to add a Virtual detail in a Modal, but it do not shows Detail.
In Contact Page I have Virtual Detail and after clicking in row I open Modal where I added  Virtual Detail but it do not shows and there  are no errors also in Console.

This is A Modal after clicking in row and its empty.

 

Code For Modal:

define("UsrCreateVirtualFinancialAccountsModalPage", ["ModalBox", "css!UsrCustomStylesCss"], function(ModalBox, UsrCustomStylesCss) {
	return {
		attributes: {
 
		},
		messages: {
			"DataFromModal": {
				mode: Terrasoft.MessageMode.PTP,
				direction: Terrasoft.MessageDirectionType.BIDIRECTIONAL
			}
		},
		methods:{
			init: function(callback, scope) {
				this.callParent(arguments);
            	console.log('test')
			},
		},
		details: /**SCHEMA_DETAILS*/{
			"UsrFinancialAccountsVirtualDetail": {
				"schemaName": "UsrFinancialAccountsVirtualDetail"
			},
		},
		diff: [
			{
				"operation": "insert",
				"name": "MyContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.CONTAINER,
					"items": []
				}
			},
			{
				"operation": "insert",
				"name": "MyGridContainer",
				"parentName": "MyContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.GRID_LAYOUT,
					"items": []
				}
			}, 
 
			{
				"operation": "insert",
				"name": "UsrFinancialAccountsVirtualDetail",
				"values": {
					"itemType": 2,
					"markerValue": "added-detail"
				},
				 "layout": {
                        "column": 0,
                        "colSpan": 25,
 
                        "row": 5,
                        "rowSpan": 5
                    },
				"parentName": "MyGridContainer",
				"propertyName": "items",
				"index": 1
			},
		]
	};
});
Like 0

Like

1 comments

Hello. 
I implemented similar logic but instead of opening a modal page, i open card for the detail. In case section i added a test detail. When double clicking on a record in this detail onGridRowDoubleClick method is called which set values of record to sessionStorage and opens a UsrTestCardPage. Than init method is called while page is initializing which sets the field values.

Card schema:
 define("UsrTestCardPage", [], function() {
    return {
        entitySchemaName: "UsrTestDetail",
        attributes: {},
        modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
        businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
        methods: {
            init: function() {
                this.callParent(arguments);
                this.getSessionStorage();
            },
            
            getSessionStorage: function() {
                var UsrName_SessionValue = sessionStorage.getItem("UsrName_Session");
                var UsrIntColumn_SessionValue = sessionStorage.getItem("UsrIntColumn_Session");
                var Id_SessionValue = sessionStorage.getItem("Id_Session");
                this.set("UsrName", UsrName_SessionValue);
                this.set("UsrIntColumn", UsrIntColumn_SessionValue);
                this.set("Id", Id_SessionValue);
            }
        },
        dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
        diff: /**SCHEMA_DIFF*/[
            {
                "operation": "insert",
                "name": "UsrName2a0f6821-93ff-4f8b-a8c0-e58bb9032171",
                "values": {
                    "layout": {
                        "colSpan": 24,
                        "rowSpan": 1,
                        "column": 0,
                        "row": 0,
                        "layoutName": "ProfileContainer"
                    },
                    "bindTo": "UsrName"
                },
                "parentName": "ProfileContainer",
                "propertyName": "items",
                "index": 0
            },
            {
                "operation": "insert",
                "name": "INTEGER406f5583-84ac-4659-9ff8-46b9c72de82a",
                "values": {
                    "layout": {
                        "colSpan": 24,
                        "rowSpan": 1,
                        "column": 0,
                        "row": 1,
                        "layoutName": "ProfileContainer"
                    },
                    "bindTo": "UsrIntColumn",
                    "enabled": true
                },
                "parentName": "ProfileContainer",
                "propertyName": "items",
                "index": 1
            },
            {
                "operation": "insert",
                "name": "LOOKUPcb467c2f-f352-4ac0-90ea-f25c2ed22119",
                "values": {
                    "layout": {
                        "colSpan": 24,
                        "rowSpan": 1,
                        "column": 0,
                        "row": 2,
                        "layoutName": "ProfileContainer"
                    },
                    "bindTo": "UsrCase",
                    "enabled": true,
                    "contentType": 5
                },
                "parentName": "ProfileContainer",
                "propertyName": "items",
                "index": 2
            }
        ]/**SCHEMA_DIFF*/
    };
});

 

 

Detail schema:


Hope this helps

Show all comments