Hi,

I have a minipage that has lookup (contact) and whenever I try to add a new non-existing it suggests it as "New ContactName" which is nice, but when I click that, it opens the contact minipage and closes the original minipage and doesn't re-open the original minipage after I closed the contact minipage upon saving.

Do you have any idea of a better approach than making a custom modal?

Like 0

Like

3 comments
Best reply

Hi,

I ended up making a Modal [BaseModalBoxPage] to create my own minipage.

I found this code segment in LookupQuickAddMixin and I want to know where can I change the value of UseSilentCreation?
 

/**
		 * Checks that entity has mini page add mode allowed.
		 * @private
		 * @param {String} entitySchemaName Name of the entity.
		 * @param {Array} [additionalDefaultValues] Additional default values.
		 * @return {Boolean} True, if feature UseSilentCreation is turned off, and entity has add mini page.
		 */
		_needOpenMiniPage: function(entitySchemaName, additionalDefaultValues) {
			const entityStructure = this.getEntityStructure(entitySchemaName);
			if (!entityStructure) {
				return false;
			}
			const notUseSilentCreation = !Terrasoft.Features.getIsEnabled("UseSilentCreation");
			const editPages = entityStructure.pages;
			const typeLookupItem = additionalDefaultValues?.find((item) => item.attributeName === "TypeLookup");
			let page;
			if (typeLookupItem) {
				page = editPages.find((page) => page.UId === typeLookupItem.value);
			}
			page = page || Terrasoft.first(editPages);
			const hasAddMiniPage = page?.hasAddMiniPage;
			return notUseSilentCreation && Boolean(hasAddMiniPage);
		},
 
		/**
		 * Open page or mini page for new entity record.
		 * @protected
		 * @param {Object} newEntityConfig Entity config.
		 * @param {Object} newEntityConfig.entitySchema Entity schema.
		 * @param {String} newEntityConfig.entitySchemaName Entity schema name.
		 * @param {String} newEntityConfig.columnName Column name.
		 * @param {String} newEntityConfig.displayColumnValue Display column value.
		 * @param {String} newEntityConfig.valuePairsFromFilters Default values that were sent from filters.
		 * @param {Array} newEntityConfig.additionalDefaultValues Additional default values.
		 * @param {Object} viewModel View model context.
		 */
		openPageForNewEntity: function(newEntityConfig, viewModel) {
			var cardConfig = this._getNewEntityPageConfig(newEntityConfig);
			this._subscribeNewEntityCardModuleResponse(newEntityConfig.attributeName ?? newEntityConfig.columnName, cardConfig, viewModel);
			if (this._needOpenMiniPage(cardConfig.entitySchemaName, newEntityConfig.additionalDefaultValues)) {
				this.openAddMiniPage.call(this, cardConfig);
			} else {
				this._networkUtils.openCardInChain(cardConfig);
			}
			this.set && !newEntityConfig.attributeName && this.set(newEntityConfig.columnName, null);
		},

Hello,

 

It seems that this was already customized since OOB does not allow adding new records to the lookup inside the mini page.

 

As for the UseSilentCreation - it's a system feature with the UseSilentCreation code according to the code in the very same LookupQuickAddMixin

Go to 

 

/0/Nui/ViewModule.aspx#Section/AppFeature_ListPage - for old UI

/0/Shell/#Section/AppFeature_ListPage - Freedom UI

 

find the UseSilentCreation feature (if the record is not present there - create it and enable it for all employees role) and relogin to the app.

Hi,

I ended up making a Modal [BaseModalBoxPage] to create my own minipage.

Show all comments

Hi Team,

 

I'm trying to show the path on a custom embedded map in creatio edit page using the below given code in the edit page of the section for the polyline encoded path. However, it shows no path or coordinates on the map in the edit page. Could anyone help?

 

Diff Block to insert map in the screen:

 

{
				"operation": "insert",
				"name": "GMaps",
				"values": {
					"itemType": 7,
					"id": "googleMap",
					"styles": {
						"height": "500px"
					},
					"items": []
				},
				"parentName": "LeftModulesContainer",
				"propertyName": "items",
				"index": 2
			},

 

 

 

Method 

initMap = function() {
    var map = new google.maps.Map(document.getElementById('googleMap'), {
        center: { lat: 28.4595, lng: 77.0266 },
        zoom: 8
    });
 
    // Polyline encoded string
    var encodedPolyline = "ic`i@ohqfN@A??????????????????????????????????????????????A????????L?HABAH@KEREDEDCJIFEJ??MFMHOHMFIFCF??EBC@ABC@AD@CIFEFCDEDCBCBBCEFC@?@A@A@@CCD?@ABABA@AD@CEFCBA@?@A@CB@AEFEBCDEDEDEF??EFEFGHAFGB@ACFCD?B?BABB?AA@@?AA?????????????????????@A???C@AA??A?@?D??A@?A????????????A@?A??@???A????@@??AA@@A?B?@?@@?A??@?????????????A?@???????????????????????????????A?@?AA??@???????A????@?????A?@?????A?????@A??????????????????????????????????????????????????????????????????????????????????????A?????A@??@AA@??????@@???A?@????????????????????????????????????????????????????????????ACA@??@?????A@?@A????A????ADABCDCDGLEJ??EJEHEJGJEL??ELELCNIJEJ??CJCFCHGHCHEH??EJGLIJMHKH??OHMFMFOFMFMF??KFKFMFOFMDOH??MHKJGJIPOPGH??KFKFG@EHED??GBEHCJGJEHEH??GHAFEBCBCDA??AE@?B?@A@CDAD@C?H???CAA?AA@@?A?A@???????????@?AA?@???????AA?????@?AABA@@?A??A??????????????A??@????@?A@A@CBCFCDGL??EDCDE@ABCF@CEH?DEDC@A?A?@AEHCDEDCLEH??EJEHGJIPGJIL??ELKNIJKLIHEP??EHEFCBADCBAB@CCDC@?@?@?@?AABA@??AA?AAA@@AA?AA???@@AA???????A???@?A?@?????????????A?@?@A?@A???????????????A??@???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????";
 
    // Decode polyline
    var decodedPath = google.maps.geometry.encoding.decodePath(encodedPolyline);
 
    // Create a polyline and set its path to the decoded path
    var polyline = new google.maps.Polyline({
        path: decodedPath,
        geodesic: true,
        strokeColor: '#FF0000',
        strokeOpacity: 1.0,
        strokeWeight: 20,
        map: map 
    });
};
 
$.ajax({
    url: "https://maps.googleapis.com/maps/api/js?key=APIkeyvalue&callback=initMap&libraries=geometry",
    dataType: "script"
});
{
				"operation": "insert",
				"name": "GMaps",
				"values": {
					"itemType": 7,
					"id": "googleMap",
					"styles": {
						"height": "500px"
					},
					"items": []
				},
				"parentName": "LeftModulesContainer",
				"propertyName": "items",
				"index": 2
			},

 

Many Thanks,

Sarika

Like 1

Like

4 comments

Hi Team,

 

Could anyone help, Please?

Maybe instead of referencing the map when creating the polyline, specifically add it after. After creating the polyline add: 

polyline.setMap(map);

🤷🏼‍♂️

Ryan

Hi Ryan,

 

Thanks for the response. Tried this but still not working.  

Sarika Sharma,

Might have better luck in a forum for the maps api or StackOverflow.

Ryan

Show all comments

Hi Community,

I want to place three new fields in the Account panel, of the Contact section.

I have already read the article https://academy.creatio.com/docs/developer/interface_elements/record_pa…

but this article explains how to add a new Connected Account Profile, and not how to extend the existing one.

Any idea how I can achieve this ?

Sasor

Like 0

Like

3 comments
Best reply

Hi Sasor,

 

This is done in the same way with the only difference that:

 

1) Existing AccountProfileSchema should be replaced

2) In the diff array of the replaced AccountProfileSchema you need to add 3 new fields.

 

I've also previously showed how to add new columns to the same profile schema, but in the OpportunityPage (here). Same approach here should be used to add new columns.

Hi Sasor,

 

This is done in the same way with the only difference that:

 

1) Existing AccountProfileSchema should be replaced

2) In the diff array of the replaced AccountProfileSchema you need to add 3 new fields.

 

I've also previously showed how to add new columns to the same profile schema, but in the OpportunityPage (here). Same approach here should be used to add new columns.

Hi oleg,

Thank you for the great answer.

Just to double check , by ' Existing AccountProfileSchema should be replaced' you mean:

Thank you again

Sasor

Sasori Oshigaki,

 

Yes, replacing view model should be created.

Show all comments