Hi community,

 

I read the article (https://community.creatio.com/questions/add-action-detail) in Creatio community and added a button in the action menu of our order product detail.

But the visibility seems not working. May you help me to adjust the code below? What I

need is to show the button when some detail records are selected, and hide the button otherwise.

 

                     addToolsButtonMenuItems: function(toolsButtonMenu) {

                             this.callParent(arguments);

                             toolsButtonMenu.addItem(this.getButtonMenuSeparator());

                             toolsButtonMenu.addItem(this.getButtonMenuItem({

                               Caption: this.get("Resources.Strings.UsrBtnBatchUpdate"),

                               Click: {"bindTo": "OnButonClick"},

                               Visible: {"bindTo": "IsSelectRecord"}

                             }));

                     },

 

Thanks a lot!

Like 0

Like

2 comments
Best reply

Hi Andrew,

 

Please use the following approach:

methods: {
				addToolsButtonMenuItems: function(toolsButtonMenu) {
					this.callParent(arguments);
					toolsButtonMenu.addItem(this.getButtonMenuSeparator());
					toolsButtonMenu.addItem(this.getButtonMenuItem({
						Caption: {"bindTo": "Resources.Strings.CustomButton"},
						Click: {"bindTo": "onButonClick"},
						Visible: {"bindTo": "getCustomButtonVisible"},
					}));
				},
				getCustomButtonVisible: function() {
					return this.isSingleSelected();
				},
				onButonClick: function() {
					console.log("Clicked!");
				}
			},

there is no IsSelectRecord base attribute that will make the button visible or invisible, thus there are basic methods to make "Edit" or "Copy" buttons enabled\disabled so I've used the logic behind them as an example to make the custom button visible.

Hi Andrew,

 

Please use the following approach:

methods: {
				addToolsButtonMenuItems: function(toolsButtonMenu) {
					this.callParent(arguments);
					toolsButtonMenu.addItem(this.getButtonMenuSeparator());
					toolsButtonMenu.addItem(this.getButtonMenuItem({
						Caption: {"bindTo": "Resources.Strings.CustomButton"},
						Click: {"bindTo": "onButonClick"},
						Visible: {"bindTo": "getCustomButtonVisible"},
					}));
				},
				getCustomButtonVisible: function() {
					return this.isSingleSelected();
				},
				onButonClick: function() {
					console.log("Clicked!");
				}
			},

there is no IsSelectRecord base attribute that will make the button visible or invisible, thus there are basic methods to make "Edit" or "Copy" buttons enabled\disabled so I've used the logic behind them as an example to make the custom button visible.

Oleg Drobina,

Thank you for your guid!. It works for a single detail record selected, like the behavior of "Edit" or "Copy".

What I want is the like the behavior of "Delete", and I found the solution in the academy.

In summary, I just adjusted the code below to approach the behavior like "Delete" action.

 

getCustomButtonVisible: function() {

    var selectedRows = this.get("SelectedRows");

    return selectedRows ? (selectedRows.length > 0) : false;

},

 

Thank you!

Show all comments

Hello Creatio community

Here is the Scenario

1- Open Account Mini Page

2- Open Modal Window of City/Click New

3- City Edit Page will open in background, meanwhile the AccountMiniPage is still open

 Is it possible that when doing step 2,  the City Edit page appears , and that after adding a city and clicking Save, we are redirected to the MiniPage ?

Kind regards

Sasori

 

Like 0

Like

1 comments

Hello,

 

Thank you for your report.

As for now, the lookups on the mini pages could be only as a dropdown list.

We have already registered the bug for our R&D team to fix this functionality in further releases. I will assign your case to this project in order to increase its priority.

Show all comments

Hi Team,

 

We have a scenario to display only few products when the add (+) icon is clicked in the Product detail of Order section. When the add record is clicked a product catalogue is displayed.



Required Filter Scenario:

All the products that belong to a particular price list alone should be shown in the product catalogue list along with additional columns in the Product Price table is also taken into consideration for the filter.

 

Only Products that match the below conditions should be displayed in the list,

  1. Particular Price List.
  2. Particular column value in Product Price (Custom Column ex: UsrProductGrade).
  3. Particular column value in Product Price (Custom Column ex: UsrIsActive).

 

Required Default Value in UOM Lookup:

When the product catalogue page is opened the UOM (Unit of Measure) field should be set with a particular lookup value by default available in that lookup & set to locked (not editable).

 

Filter out/Remove/Hide all product's base prices in the product catalogue

Don't want any base price in the product price and not needed to show this record in the product catalogue.

 

Below is the setup for the above case:

Step 1: Filter applied in ProductSelectionSchema (Not Working)

 

getProductInBasePriceListEsq: function(basePriceList) {
			var basePriceListProductEsq = this.getBaseESQ("Product");
 
			var customPriceList = Terrasoft.SysSettings.cachedSettings.UsrcustomPriceList;
 
			var productPricePrefix = "[ProductPrice:Product:Id].";
			basePriceListProductEsq.rowCount = 40;
			var productGrade = this.sandbox.publish("productGradeMessage", null, "productFilterGradeMessage");
 
			basePriceListProductEsq.addColumn("Price", "ProductPrice");
			basePriceListProductEsq.addColumn(productPricePrefix + "Price", "Price");
			basePriceListProductEsq.addColumn(productPricePrefix + "Currency", "Currency");
			basePriceListProductEsq.addColumn(productPricePrefix + "Tax", "Tax");
			basePriceListProductEsq.addColumn(productPricePrefix + "Tax.Percent", "DiscountTax");
			basePriceListProductEsq.addColumn(productPricePrefix + "PriceList", "PriceList");
			basePriceListProductEsq.addColumn(productPricePrefix + "UsrProductGrade", "UsrProductGrade");
			basePriceListProductEsq.addColumn(productPricePrefix + "UsrIsActive", "UsrIsActive");
 
			//Additional Filters for Grade and Active product
			basePriceListProductEsq.filters.addItem(this.Terrasoft.createColumnFilterWithParameter(
				this.Terrasoft.ComparisonType.EQUAL, productPricePrefix + "PriceList.Id", customPriceList));	
			basePriceListProductEsq.filters.addItem(this.Terrasoft.createColumnFilterWithParameter(
				this.Terrasoft.ComparisonType.EQUAL, productPricePrefix + "UsrProductGrade", productGrade.value));
			basePriceListProductEsq.filters.addItem(this.Terrasoft.createColumnFilterWithParameter(
				this.Terrasoft.ComparisonType.EQUAL, productPricePrefix + "UsrIsActive", true));
 
			this.applyAdditionalFilters(basePriceListProductEsq);
			this.initializePageableOptions(basePriceListProductEsq);
			basePriceListProductEsq.filters.addItem(
				this.Terrasoft.createColumnFilterWithParameter(this.Terrasoft.ComparisonType.EQUAL,
					"IsArchive", false));
			return basePriceListProductEsq;
		},

 

Step 2:  Made the value "Base" inactive from pricelist lookup (still all the products base price list is shown).



 

None of the filters applied is working. Instead, it shows the products that are matched with new pricelist value in the pricelist lookup for other products which doesn't has new value it takes the base price list and displays.



Any insight on this would be highly appreciated!

 

 

BR,

Bhoobalan Palanivelu.

Like 0

Like

8 comments

Hello Bhoobalan,

 

Maybe it's much easier to modify the logic of the onGridDataLoaded method in the ProductSelectionSchema module and modify the final gridData collection that will be displayed? When the grid data is loaded in the context of execution of this method you can check all records loaded to this selection page one by one and check whether they have the needed price list (and if so leave it in the grid data, othewise remove this record from grid data) and also you can apply modifications to such records (like setting the default unit of measure). Because creating custom ESQ that is asynchronous can result in inconsistent behavior and also to errors when loading the grid.

Oleg Drobina,

 

It would be of great help if you could assist with a simple sample for this case in the Product selection schema.



And how to set a default value for a Unit Of Measure field and make it locked?



BR,

BBhoobalan Palanivelu.

Bhoobalan Palanivelu,

 

to lock the "Unit Of Measure" column you need to override the getEditableColumns method in the ProductSelectionSchema module. For example like in the example below:

getEditableColumns: function() {
				let parentColumns = this.callParent(arguments);
				if (this.Terrasoft.isCurrentUserSsp()) {
					parentColumns = this.Terrasoft.without(parentColumns, "Price");
				}
				parentColumns = this.Terrasoft.without(parentColumns, "Unit");
				return parentColumns;
			},

As a result you won't be able to modify the Unit Of Measure" column.

 

As for settings the removing some results from the grid: for example I have two products in the selection window: one has the price of 900 and another one has the price of 100. I want to remove the product with the price that is less or equal 100. To do so we override the onGridDataLoaded method in the following manner:

onGridDataLoaded: function(response) {
				if (!response.success || response.queryResults.length === 0) {
					return;
				}
				var dataCollection = this.Ext.create("Terrasoft.Collection");
				this.prepareResponseCollection(dataCollection, response);
				var lastValue = null;
				var gridData = this.getGridData();
				var canLoadData = false;
				for (var i=0; i < dataCollection.getItems().length; i++) {
					var price = dataCollection.getItems()[i].values.Price;
					if (price <= 100) {
						dataCollection.removeByIndex(i);
					}
				}
				if (dataCollection.getCount()) {
					var lastItemIndex = dataCollection.getCount() - 1;
					var lastItem = dataCollection.getByIndex(lastItemIndex);
					var products = gridData.collection.filterBy(
						function(res) {
							var resId = res.get("RealRecordId");
							return resId === lastItem.get("RealRecordId");
						}
					);
					if ((products.length <= 0)) {
						lastValue = lastItem.get("Name");
						canLoadData = true;
					}
				}
				this.set("sortColumnLastValue", lastValue);
				if (canLoadData) {
					gridData.loadAll(dataCollection);
				}
				this._updateGridCaptionContainerVisibility();
				this.set("GridData", gridData);
			},

the main body of the method is a basic body and the customization here goes at:

for (var i=0; i < dataCollection.getItems().length; i++) {
					var price = dataCollection.getItems()[i].values.Price;
					if (price <= 100) {
						dataCollection.removeByIndex(i);
					}
				}

where we prepare received data collection for further basic processing. So you can test this approach on your side.

Oleg Drobina,



Appreciate the detailed response!



How shall we set some particular/specific value as the default value to this Unit Of Measure (UOM) lookup field?



We have locked it in getEditableColumns() and how does the logic go by to set a default value?



Best Regards,

Bhoobalan Palanivelu.

Bhoobalan Palanivelu,

 

this is the custmization inside the onGridDataLoaded method, but additionally to the previous removal of records we will need to set the value for the "Unit of measure" column for each record after the unnecessary records are removed from the dataCollection.

Oleg Drobina,



Thanks for the response!



Still, the filter remains not to work even with the logic of removing values from the collection in OnGridDataLoaded().

 

The code gets executed but still, the products with 0 prices are shown in the Grid. please find the below references.

 

Logic es executing:

 

All records are again loaded into the Grid 

 

 

BR,

Bhoobalan Palanivelu.

Bhoobalan Palanivelu,

 

I've checked and indeed it happens in case there are two records with the price = 0 that are located one after another in the dataCollection (for example the 0 item has 0 price and the 1st item has 0 price). It happens because the logic removes an item with the 0 index (i=0), as a result an item with the 1 index is moved to the 0 index (because the original item with 0 index was deleted) and since we are in a cycle the code goes to check the item with the 1 index and skips that item that moved to the 0 index.

 

Perhaps this dataCollection should be processed in terms of a separate collection and then this custom collection should be placed into the dataCollection.

Oleg Drobina,



Yes, Now we were able to remove all the products where "Price = 0".



Also, how to make a filter to the grid products?

Unable to set the Default Value for the UOM field.



BR,

Bhoobalan Palanivelu.

Show all comments

Hi Team,

 

We are creating workspace for each role from the organisation structure and adding the role in the user group of the workspace. In the same way, when we create a workspace only for the manager in the topmost role in the hierarchy of the Organizationa structure and when we try to login as the manager.

 

All the workspaces created for the roles below the manger in the structure also is viewed by the manager. Is there a way, were we can make the workspace created only for the manager viewed by the manager and the rest of the workspace hidden/not shown to the manager.

 

Thanks in advance!

Regards,

Mayan

Like 0

Like

1 comments

Hello,

 

The manager has all the rights given to his employees. They cannot be removed.

 

For more information on delegating rights:

Delegate permissions

Object operation permissions

Show all comments

Hello!



As we connect records to the processes, we would like to display in a detail of the page (e.g. Account) all processes (from Process log) connected to that Account.



How could it be possible?

 

Thank you!

Like 1

Like

3 comments

Good day,

 

I believe that you should be able to achieve your goal by using a [Connect process to object] process element.

 

With it, you can connect the started process to the Account you want.

First you will need to read out the Id of the record the process should be connected to and then tie it in that element, it should look something like this:

 

Hope it helps!

Artem,

Thanks, but we already know how to connect. Now we want to display all the processes connected to the certain Account in the detail on Account page

Good day,

 

You could try creating a custom detail to your section.

The information on the processes connections are stored in the "Object in process" table (code: SysProcessEntity)

 

Thank you.

Show all comments

Im trying to replicate this feature the Accounts tab has in its Addresses detail which i'm trying to replicate on a similar detail on a custom section.

Like 1

Like

4 comments
Best reply

hi Oliver Crowe,



This is found in the "BaseAddressDetailV2" schema and the corresponding method for this functionality is getEditPages().

 

The below function can be modified/overridden in your corresponding address detail (Account Address or Contact Address).

Account Address - AccountAddressDetailV2

Contact Address - ContactAddressDetailV2

			/**
			 * @inheritdoc Terrasoft.BaseSchemaViewModel#getEditPages
			 * @overridden
			 */
			getEditPages: function() {
				var menuItems = this.Ext.create("Terrasoft.BaseViewModelCollection");
				var entityStructure = this.getEntityStructure(this.entitySchemaName);
				if (entityStructure) {
					var editPage = entityStructure.pages[0];
					var addressTypes = this.get("AddressTypes");
					addressTypes.each(function(addressType) {
						var id = addressType.get("Id");
						var caption = addressType.get("Name");
						var schemaName = editPage.cardSchema;
						var item = this.getButtonMenuItem({
							Caption: caption,
							Click: {bindTo: "addRecord"},
							Tag: id,
							SchemaName: schemaName
						});
						menuItems.add(id, item);
					}, this);
				}
				return menuItems;
			},

"Address Type" is a lookup that has the values appearing as "Actual, Legal, Shipping". Also you can customize values in this lookup as well.

 

 

 

BR,

Bhoobalan Palanivelu.

Greetings,



Could you kindly describe the feature in a bit more detail? What exact function are you trying to achieve with this detail? 

Mykhailo Zeleniuk,

 

Can you see the picture in my post? When you go to enter a new record to the detail it pops up with options from the Address Type field and automatically fills that in with the selected type.

hi Oliver Crowe,



This is found in the "BaseAddressDetailV2" schema and the corresponding method for this functionality is getEditPages().

 

The below function can be modified/overridden in your corresponding address detail (Account Address or Contact Address).

Account Address - AccountAddressDetailV2

Contact Address - ContactAddressDetailV2

			/**
			 * @inheritdoc Terrasoft.BaseSchemaViewModel#getEditPages
			 * @overridden
			 */
			getEditPages: function() {
				var menuItems = this.Ext.create("Terrasoft.BaseViewModelCollection");
				var entityStructure = this.getEntityStructure(this.entitySchemaName);
				if (entityStructure) {
					var editPage = entityStructure.pages[0];
					var addressTypes = this.get("AddressTypes");
					addressTypes.each(function(addressType) {
						var id = addressType.get("Id");
						var caption = addressType.get("Name");
						var schemaName = editPage.cardSchema;
						var item = this.getButtonMenuItem({
							Caption: caption,
							Click: {bindTo: "addRecord"},
							Tag: id,
							SchemaName: schemaName
						});
						menuItems.add(id, item);
					}, this);
				}
				return menuItems;
			},

"Address Type" is a lookup that has the values appearing as "Actual, Legal, Shipping". Also you can customize values in this lookup as well.

 

 

 

BR,

Bhoobalan Palanivelu.

Bhoobalan Palanivelu,

how exactly do you access address types? I m trying to implement this on EmploymentType, but I cannot access the values in employment type. 

Show all comments

Hi there, 

 

I have made a customisation to the "Opportunity closure" process by adding in 2 additional elements (see below, nothing fancy). 

When I save a new version of the process and compile, I get a host of errors:

 

 

Can someone help me please? 

Like 0

Like

2 comments
Best reply

Hello,

 

This issue might be connected to how packages are saved in new versions.

Please try doing the following:

1. Run full code generation

2. In the properties of the package that is mentioned in the error, uncheck the box "Compile into separate assembly"

3. Run the full compilation again.



That the error should be gone after that.

Hello,

 

This issue might be connected to how packages are saved in new versions.

Please try doing the following:

1. Run full code generation

2. In the properties of the package that is mentioned in the error, uncheck the box "Compile into separate assembly"

3. Run the full compilation again.



That the error should be gone after that.

Hi, thank you this worked!

Show all comments

Hello community,

 

I need to add two lookup columns to an edit page connected to the same object but with different displayValue. I have read this article https://community.creatio.com/ideas/multiple-display-values-same-lookup and I would like to know if this feature was finally implemented.

 

Thank you!

 

Like 0

Like

1 comments

Hello,



I believe your business task could be achieved by this MarketPlace add-on.

Show all comments

Hi Community,

 

In creatio charts, is there a way to shorten amount/count in y axis, suppose if it is one million instead of 1000000 we will show 1M for one hyndred thousand instead of 100000 we will show 100K. The display is not looking good for managers having all these zeros

 

 

Thanks

Like 3

Like

2 comments

Hello Fulgen, 

 

As of now such changes cannot be achieved with a help of basic system tools. We've registered a query for our responsible R&D team to consider implementing such functionality in the upcoming versions of the Application.

 

Best regards,

Anastasiia

Yes  +1 as high priority when presenting dashboards to management, it bothers ALL our clients, in terms of how they show numbers need a big revamp - we should be able to provide a fixed axis height or index, be able to show the numbers like here below in K or M, like 10M rather than 10000000. In terms of numbering presentation, dashboards in Creatio are really lagging behind a lot of equivalent software in graphs...

Show all comments

Hi there, can someone assist me please? I am trying to display the account logo on the opportunities landing page. When I try to add it to the tile view I can't seem to find the logo field. The closest I could find is [Opportunity] > [Account] > [Account Logo] 

 

Please assist. Thanks. 

 

Like 0

Like

2 comments

hi Nemanja Stabic,

 

In this case, do you want to add an image field in the Opportunity section? Here is the academy article that helps this case Add image field in record page.





BR,

Bhoobalan Palanivelu

Hi Bhoobalan, 

 

Thanks for the response. I have looked at the article you shared and it’s not quite what I am looking for. I am looking to add the logo of the Account on the Opportunities landing page i.e. the page with the grid/ tile view. Is there a way to do this?

Show all comments