Hi Creatio Community,

I'm currently working on a customization for the Activity page, and I need some help with dynamically showing/hiding tabs based on the activity type. Here’s what I need to achieve:

  1. Hide the "Attachment" tab when the activity type is "Task."
  2. Show the "Case Attachment" tab for tasks related to a specific case only (it should display attachments only for the selected case).
  3. For all other activity types, the "Case Attachment" tab should be hidden, and the regular "Attachment" tab should be visible.

Essentially, I want the tab visibility to switch dynamically based on the activity type and the case involved. I’d appreciate any suggestions on how to implement this, whether through JavaScript handlers, custom logic, or any other method that can meet this requirement.

Thanks in advance

Like 0

Like

1 comments

Hello,
 

This can be easily implemented using business rules such as "Show/hide an element on a Freedom UI page." We recommend exploring this functionality on our academy.
 

https://academy.creatio.com/docs/8.x/no-code-customization/customization-tools/ui-and-business-logic-customization/freedom-ui-business-rules#title-2416-2
 

I hope this helps!

Show all comments

Good day, I have a question regarding the tabs in Classic UI. I want to make them disabled, or locked or unclickable in my edit page. If you know how to implement it please could you show it in the following code snippet:

                "operation": "insert",
                "name": "AgbPrimaryDataTab",
                "values": {
                    "caption": {
                        "bindTo": "Resources.Strings.AgbPrimaryDataTabCaption"
                    },
                    "items": [],
                    "order": 0
                },
                "parentName": "Tabs",
                "propertyName": "tabs",
                "index": 2
 
Like 0

Like

1 comments

Hello Behruzbek, 

If you don't want some users to see the existing tabs, use the following article to hide tabs by code based on different conditions.

Also, it's possible to add business rules for some users. Please note that adding the role to the business rule is impossible for now.

Best regards, 

Anhelina!

Show all comments

Hi,

 

is there a way to change to name of the browser tab depending on which page you're in?

Example: You're in a case and want to have the case number displayed in the browser tab name for a better overview.

Like 0

Like

3 comments

Hello,

 

You can customize only the favicon and the company's name in the browser tab. Detailed instruction can be found in the Add corporate logo Academy article

Unfortunately, there are no ways to customize tabs according to your business task at the moment. The idea to extend the possibility of browser's tab customization is already accepted by our R&D team. 

Hi,

Is this still not doable in the current version? I forced Tab name updated but it kept reverting back to "Creatio"

Hello,

Unfortunately, there is no such option at this time. We've registered it in our R&D team backlog for consideration and implementation in future application releases. It may change in future releases.

Currently, you can only change it to another product name by changing the ProductName system setting.

Thank you for helping us to improve our product.

Show all comments

We are going to release this feature via business rules in the next release.

2 comments

Hello Alfredo,

I have an article on showing/hiding tabs at runtime, this will show you how to show or hide the tabs. Basically, you'll need to wire up a change event for the lookup (See https://customerfx.com/article/triggering-an-event-when-a-field-is-chan…), then you can use the code in this article to show or hide the tabs as needed: https://customerfx.com/article/programmatically-selecting-showing-or-hi…

Ryan

The question was discussed in the community post by the link below. 

https://community.bpmonline.com/questions/how-showhide-tab-based-condition-74

 

 

Show all comments

I am trying to edit account page to add a new tab but that was not successful. 

So I deleted the replacing object created for account section with replacing scheme.

Now the account section page opens perfectly fine when debug mode is off in console. But when I turn it on, it crashes the page and given me the following error.

Can someone please help me, why is there any error in first place only when I turn on debug mode in console?

 

 

Like 0

Like

2 comments

Hello Ramnath,

 

It is hard to say why could this issue occur, but you can try fixing this error by going to configurations and re-saving AccountPage schema (please also note that in case you have several account edit page schemas (like UsrAccount1Page, UsrAccount2Page and so on)) and you need to re-save content of all those schemas (by clicking on "Save" button at the top left corner of schema editor https://prnt.sc/rdrops). Once done please relogin to the application and try to open edit page once again

 

Best regards,

Oscar

Oscar Dylan,

I was trying to build it on trial environment. I could not apply the steps you mentioned because it expired by the time.

But thanks for helping.

Ram

Show all comments

Hi Community, 

I'm working on a project for a client and wondering if it is possible to add another Tab bar within a tab on the section edit page. 

We have a Tab which contains several detail lists and if possible would like to add a tab bar partway down the page between two details so we can view other objects relating to the detail above it.

Is it possible to add multiple tab groups on the section edit page?

Thanks

Like 0

Like

1 comments

Unfortunately, there is no tools in out-of-the box system for adding multiple tab groups on the edit page.

Show all comments

Hi. I am having the issue of page Tabs, Field Groups not showing correctly in the section wizard edit mode.

I've had this problems many times. But what is causing this issue?

I'm using the english language (I have not changed language on this environment) on a demo environment with system admin role.

I believe there is a bug causing this. This is the HTML

Like 0

Like

2 comments

Dear Julius,

It seems like the section object did not save the changes correctly. Try to do the following:

1. Go to the system configurations in the advanced settings. http://prntscr.com/phqih3http://prntscr.com/phqiqe 

2. Update the database structure 

3. Generate the source code for all items

4. Compile all items.

It may take some time to perform the last 3 steps. Once you are done, try to clear your browser cache and see if the issue is resolved. If the captions are still missing, please approach our support team via support@bpmonline.com so that we could investigate this problem in your particular environment.

Best regards,

Dean

It works. Thanks Dean!

Show all comments

Hi community!

I need that instead of navigating the tabs by means of the arrow ->, they are shown in a list below, to be able to see them all together without having to navigate. That is, they are displayed in various rows depending on the amount that exists.

 

Any idea?

King Regards,

Ezequiel

Like 0

Like

2 comments

Hello Ezequiel,

You'll need to add the following CSS:

.ts-tabpanel {
    height: auto;
}
 
.ts-tabpanel-items {
    overflow: visible;
    white-space: normal;
    margin: 0 !important;
}
 
.ts-tabpanel-scroll-left {
    display: none;
}
 
.ts-tabpanel-scroll-right {
    display: none;
}

This will change the tabs to wrap onto new rows if needed. If the display is wide enough it will look like this: 

If not, they will wrap like this:

Hope this helps.

Ryan

Ryan Farley,

Thank you for a very thorough explanation!

Best regards,

Matt

Show all comments

Hi all

We have the following situation. We have accounts, and related accounts (daughter account), To show daughter account or related accounts we add a Tab in the detail section of the Master Account.

To explain it, the main accounts we have called mother accounts and related accounts, we call them daughter accounts. A Mother can have zero, one or more daughters, but a daughter can NEVER have a daughter.

We need to restrict to users to create a related account from a daughter account (a daughter account from a daughter account). When we create the first daughter account we copy the data from mother, but when one mother have at least one daughter account, the sister is created by a copy from the newest one (we got this using a LastDaughterAccountID field in Accounts Table)

To implement this we add two fields to the accounts table:
1.- The Id of the Mother Account (this field is filled only on daughter accounts)
2.- The Id of the last daughter account (this field is only filled on the mother account)

The problem we have is that we need restrict to create daughter account form a daughter account, to do this we  hide the tab in the init method when the account is a daughter account (in this way we hide the new button), this tab is only visible if LastDaughterAccountID had data (means the record is mother), when we create a daughter account the Tab hides, but when we save and close the daughter account and returns to mother account the tab remains closed, how can we do to show the tab?, I we did a refresh (F5) it solves, but this is not the way we need to resolve this.

Thanks in advance,

Julio Falcón, from Chile

File attachments

Like

9 comments

Dear Julio,

Try to use the method onEntityInitialized instead of init. The init method runs just once when you open a page. The system doesn't run the init method when you switch between records with the same edit page.

The method onEntityInitialized runs any time when the system loads data to a page. It runs even if you switch between records with the same edit page.

Thanks Eugene,

We always use the onEntityInitialized method, sorry I write Init as a generic name, because I had no idea that there was also a method called Init.

Due this what can we do? I attach the code involved in this isuue

// This is our onEntityInitialized, above the specific method (OnUsrseguimientoLoadForm) managing the tabs.
onEntityInitialized: function() {

	this.callParent(arguments);
	// 20161209 JFL ->
	
	// Es Solicitud NUEVA?
	// 20170103 JFL -> Revisar, esto se puede preguntar de otra forma
	if ( !this.get("UsrNumeroint") ) {
		// Solicitud nueva, verifica que venga del proceso crear hija => Usridmadre tiene valor
		if ( this.get( "Usridmadre" ) ) {
			// Es solicitud hija nueva => viene del proceso CREAR HIJA
			// Solicitud de Seguimiento? verificar que quien llame sea hija
			this.InicializaHija( this.get( "Usridmadre" ) ); 
			
		}
	}
	
	// valida si es solicitud de seguimiento  
	this.OnUsrseguimientoLoadForm();
	
	// 20161209 JFL <-
	
	// 20161128 JFL ->
	
	// Inicializa variables globales (declaradas en Parameters ventana de la derecha) para evaluar caso AcompJI
	lNinoIntegra = false;
	lConsultanteIntegra = false;
	lRelacionconelNino = false;
	
	// Evalua si es un caso de AcompJI y actualiza campo usrAcompJI a la carga del form
	this.EvaluaSolicitudAcompJI();
	
	// BORRAR - Esto es redundante, pero p´´or algun motivo quiza por asincronia no evalua los otros valores antes...
	//this.onEvualuaCondicionesAcompJI();
	
	// Evalua los campos que restringen exigencias de campos obligatorios, en su caso quita o pone obligatoriedad. 20161205 JFL -> Se agrega UsrPendRecontacto
	this.CambiarRequired( this.get( "UsrLlInconclIntrr" ), this.get( "UsrNoseencuentracond" ), this.get( "UsrPendRecontacto" ) );
	// 20161128 JFL <-
	
	// 20161221 JFL
	this.on("change:UsrConsultante", this.onUsrConsultanteChanged(), this);
	this.on("change:UsrNinoa2", this.onUsrNinoa2Changed(), this);
	//this.on("change:UsrColumn3", this.customMethod(), this);
	
},

OnUsrseguimientoLoadForm: function() {
	// 20161222 JFL -> Evaluar si esconde TAB
	var tabsCollection = this.get( "TabsCollection" );
	var UsrSolicitds3Page8Tab = tabsCollection.contains( "UsrSolicitds3Page8Tab" ) ? tabsCollection.get( "UsrSolicitds3Page8Tab" ) : false;

	// Verfica el estado actual del campo
	if ( this.get( "Usrseguimiento" ) ) {
		/***
		* Esta marcado: 
		*
		* Es madre?, si tiene hijas, lo debe deshabilitar
		* Es hija, lo deshabilita y lo oculta
		*
		***/
		// El hecho de tener hija, implica es madre con hija...
		// Deshabilita control si es madre con hija o si es hija
		this.set( "IsUsrSeguimientoEnabled", !( this.get( "UsrIdultimahija" ) || this.get( "Usridmadre" ) ) );
		
		// Ademas, si es hija, esconde el control
		this.set( "IsUsrseguimientoVisible", !this.get( "Usridmadre" ) );
		
	}
	
	// 20161222 JFL -> Evaluar si esconde TAB
	if ( !this.get( "Usridmadre" ) && !UsrSolicitds3Page8Tab ) { 
			// 20161222 JFL -> es hija, porque tiene madre => Muestra TAB
			tabsCollection.insert( 4, "UsrSolicitds3Page8Tab", Terrasoft.UsrSolicitds3.UsrSolicitds3Page8Tab );
			
	} else if ( this.get( "Usridmadre" ) && UsrSolicitds3Page8Tab ) {
			// 20161222 JFL -> Esconde TAB
			Terrasoft.UsrSolicitds3.UsrSolicitds3Page8Tab = UsrSolicitds3Page8Tab;
			tabsCollection.removeByKey( "UsrSolicitds3Page8Tab" );
			
	} 
},

 

Unfortunately, there is no good way to hide the tabs dynamically. The "display" tab binding will be in the next versions. We faced similar task before. Please check the solution. I'm sure it will help you.

 

attributes: {
	"TabShowAttribute": {
		dependencies: [
			{
				columns: ["Category", "Type"],
				methodName: "showTabsForCategoryAndType"
			}
		]
	}
},
methods: {
	onRender: function(){
		this.callParent(arguments);
		this.showTabsForCategoryAndType();
	},
	
	onEntityInitialized: function(){
		this.callParent(arguments);
		this.showTabsForCategoryAndType();
	},
	
	showTabsForCategoryAndType: function(){
		var tabNames = {
			Tab1Label: "Tab008b661bTabLabel",
			Tab2Label: "Tabec56cbb4TabLabel",
			Tab3Label: "Tab503f0fa3TabLabel",
			Tab4Label: "Tab0804748dTabLabel",
			Tab5Label: "Tab3c4a107cTabLabel",
			Tab6Label: "Tabd52ee831TabLabel",
			Tab7Label: "Taba64a0c8eTabLabel",
			Tab8Label: "Tab6a275baaTabLabel",
			Tab9Label: "Taba8305340TabLabel",
			Tab10Label: "Tab8e822114TabLabel"
			
		}
		var categoryValue = this.get("Category")?this.get("Category").value:null;
		var typeValue = this.get("Type")?this.get("Type").value:null;
		var isAnyActiveDynamicTab = false;
		if(categoryValue == OpportunityConfigurationConstants.Opportunity.Category.Category1){
			if(typeValue == OpportunityConfigurationConstants.Opportunity.Type.Tab1Label){
				isAnyActiveDynamicTab = true;
				this.hideAllDynamicTabs(tabNames)
				this.hideTabByName(tabNames.Tab1Label, false);
			}
		}
		if(categoryValue == OpportunityConfigurationConstants.Opportunity.Category.Category1){
			if(typeValue == OpportunityConfigurationConstants.Opportunity.Type.Tab2Label){
				isAnyActiveDynamicTab = true;
				this.hideAllDynamicTabs(tabNames)
				this.hideTabByName(tabNames.Tab2Label, false);
			}
		}
		if(categoryValue == OpportunityConfigurationConstants.Opportunity.Category.Category1){
			if(typeValue == OpportunityConfigurationConstants.Opportunity.Type.Tab3Label){
				isAnyActiveDynamicTab = true;
				this.hideAllDynamicTabs(tabNames)
				this.hideTabByName(tabNames.Tab3Label, false);
			}
		}
		if(categoryValue == OpportunityConfigurationConstants.Opportunity.Category.Category2){
			if(typeValue == OpportunityConfigurationConstants.Opportunity.Type.Tab4Label ||
				typeValue == OpportunityConfigurationConstants.Opportunity.Type.Tab5Label){
				isAnyActiveDynamicTab = true;
				this.hideAllDynamicTabs(tabNames)
				this.hideTabByName(tabNames.Tab4Label, false);
				this.hideTabByName(tabNames.Tab5Label, false);
			}
		}
		if(!isAnyActiveDynamicTab){
			this.hideAllDynamicTabs(tabNames)
		}
	},
	hideAllDynamicTabs: function(tabNamesConfig){
		this.hideTabByName(tabNamesConfig.Tab1Label, true);
		this.hideTabByName(tabNamesConfig.Tab2Label, true);
		this.hideTabByName(tabNamesConfig.Tab3Label, true);
		this.hideTabByName(tabNamesConfig.Tab4Label, true);
		this.hideTabByName(tabNamesConfig.Tab5Label, true);
		this.hideTabByName(tabNamesConfig.Tab6Label, true);
		this.hideTabByName(tabNamesConfig.Tab7Label, true);
		this.hideTabByName(tabNamesConfig.Tab8Label, true);
		this.hideTabByName(tabNamesConfig.Tab9Label, true);
		this.hideTabByName(tabNamesConfig.Tab10Label, true);
	},
	hideTabByName: function(tabName, isHide){
		var tabsCollection = this.get("TabsCollection");
		if(tabsCollection){
			var tabIndex = tabsCollection.collection.keys.indexOf(tabName);
			var tabsPanelDomElement = document.getElementById("OpportunityPageV2TabsTabPanel-tabpanel-items");
			if(tabsPanelDomElement){
				tabDomElement = tabsPanelDomElement.querySelector('[data-item-index="'+tabIndex.toString()+'"]');
				if(tabDomElement){
					if(isHide){
						tabDomElement.style.display = "none";
					}else{
						tabDomElement.style.display = null;
					}
				}
			}
			
		}
		
	}
},

 

 

 

 

 

 

Thanks Eugene,

Perhaps it is easier to disable the "New" button when the conditions that require it are fulfilled. How can I disable this button?

The conditions are: UsrSeguimiento == true & ismadre have no data, when those conditions are meet whe need to Enable the Button, if not the button must be disabled

How can I implement this?

 

You can find the detail button diff object in the base detail schema. Please feel free to merge the button and bind the "visible" field to a new attribute. 

Then you need to throw a signal from the page when the field is changed. Subscribe on the signal on the detail and change the "visible" attribute according to the field value.

Hi Eugene,

I tried to test this, wihout binding the visible value yet to test if it works, but no happens, what exactly I must to do?

	"UsrSolicitds3": {
		"schemaName": "UsrSchema16Detail",
		"entitySchemaName": "UsrSolicitds3",
		"filter": {
			"detailColumn": "Usridmadre",
			"masterColumn": "Id"
		},
		"visible": false
	}

Is there any way to disable the button? it is called, in my case UsrSchema16DetailAddRecordButton, even I tried in the onEntityInitialized method to disable the button using: this.set( "UsrSchema16DetailAddRecordButton", false); but nothing happens

Even I tried to do this in Schema Diff, 

		diff: /**SCHEMA_DIFF*/[
	{
		// Operation type — merge.
		"operation": "merge",
		"name": "UsrSchema16DetailAddRecordButton",
		"values": {
			"visible": false //{"bindTo": "getToolsVisible"}
		}
	},

But doesn't works :-(

The name of the button is "AddRecordButton" instead of "UsrSchema16DetailAddRecordButton".

Thanks Eugene, finnaly we implement hide the tab if the conditions met

 

onRender: function(){
	this.callParent( arguments );

        // Evaluate if show/hide tab
	this.showTabHijas();
	
},

OnUsrseguimientoLoadForm: function() {
	// Verifica el estado actual del campo
	if ( this.get( "Usrseguimiento" ) ) {
		// Deshabilita control si es madre con hija o si es hija
		this.set( "IsUsrSeguimientoEnabled", !( this.get( "UsrIdultimahija" ) || this.get( "Usridmadre" ) ) );
		
		// Ademas, si es hija, esconde el control
		this.set( "IsUsrseguimientoVisible", !this.get( "Usridmadre" ) );
		
	}
	
	// Evaluate if show or hide tab
	this.showTabHijas();
	
},

showTabHijas: function() {
	// 20161222 JFL -> Evaluar si esconde TAB
	if ( !this.get( "Usridmadre" ) ) { 
		// Show TAB
		this.hideTabByName( "UsrSolicitds3Page8Tab", false );
			
	} else { 
		// Hide TAB
		this.hideTabByName( "UsrSolicitds3Page8Tab", true );
			
	} 
},

// Esconde la pestaña indicada
hideTabByName: function(tabName, isHide){
	var tabsCollection = this.get("TabsCollection");
	if(tabsCollection){
		var tabIndex = tabsCollection.collection.keys.indexOf(tabName);
		var tabsPanelDomElement = document.getElementById("UsrSolicitds3PageTabsTabPanel-tabpanel-items");
		if(tabsPanelDomElement){
			tabDomElement = tabsPanelDomElement.querySelector('[data-item-index="'+tabIndex.toString()+'"]');
			if(tabDomElement){
				if(isHide){
					tabDomElement.style.display = "none";
				}else{
					tabDomElement.style.display = null;
				}
			}
		}
	}
},

 

Thanks for your constant support,

Julio Falcon

 

Show all comments