Hi Team,

 

I have a requirement of changing the first page shown immediately after the login.

I have managed to explore the BaseViewModule schema.



From the BaseViewModule schema it is inferred that getHomePagePath: function() returns the path of the page that has to be loaded.



Here, I have a scenario based on a logged in user value, the display page should be either of these two pages below,

 

1.#PortalMainPageModule (for one condition)

2.#CardModuleV2/UserPageV2/edit/268b5da7-2ede-4b32-8bbe-9af04721ebba (for another condition) -->  Logged in users contact edit page



How could I achieve this by inheriting/extending the BaseViewModule schema, or what development action should be carried out.



Please guide me on this.



Thanks in advance!

 

 

 

Regards,

Bhoobalan P.

Like 0

Like

4 comments

Dear Bhoobalan,

 

Can you please specify why the "Home page" option in user settings does not suit your task?

 

Best regards,

Angela

Angela Reyes,

 

Thanks for the precious response!



My scenario here is to check the logged in user's contact "Job title" immediately after the login and based on the value i have to perform the navigation as below.



1. If the logged user contact's "Job Title" field has value filled --> the user has to see the (PortalMainPageModule as the first page after logiin)



2. If the logged in User contact's "Job Title" field value is empty --> the user has to see the edit page of logged in contact (CardModuleV2/UserPageV2/edit/268b5da7-2ede-4b32-8bbe-9af04721ebba (for another condition) -->  Logged in users contact edit page



Please let me know how could i use "Home page" option in user settings in my scenario.



Thanks in advance!





Regards,

Bhoobalan P.

Bhoobalan Palanivelu,

I would recommend you checking the system setting "DefaultIntroPage", which selects a record from the ApplicationMainMenu object. It should have the field IntroPageUId which contains the main page. You can try to create a schema that will replace this value with the needed option. 

 

Best regards,

Angela

Angela Reyes,



Thanks much for the response!

 



I could not find the systemsetting  "DefaultIntroPage".

 

Also, few clarifications,

1.Which schema has to be replaced or what schema has to created?

2.If it is new schema where it has to be consumed?

3.where my calculation/Condition check has to be operated?

4.How could i override the value of IntroPageUID after my calculation, thats is immediately after the login.





Regards,

Bhoobalan P.

Show all comments

Hi Team,



I need to change the fist page shown to user immediately after the login. I have managed to achieve it by replacing the BaseIntroPageSchema module.



But, i have couple of issues in it as depicted in the image below.

 

The custom function developed in BaseIntroPageSchema works well when the user logged in, as it transfers and shows the corresponding page based on condition immediately after the login.

 

ISSUES:

1.When i click on CREATIO logo, it doesn't opens Home Page

2.When i click on system designer icon it doesn't opens the System Designer Page.



what happens is, BaseIntroPageSchema is loaded again and my custom function called in init(), and navigation occurs based on the condition, I want this functionality only once at the time of login.

 

Here, i have added the code

 define("BaseIntroPageSchema", ["BaseIntroPageSchemaResources", "MainMenuTileGenerator", "AcademyUtilities"],
	function(resources, MainMenuTileGenerator) {
		return {
			attributes: {},
			messages: {},
			methods: {
 
				init: function() {
					this.callParent(arguments);
					this.profileValidate();
				},
 
 
 
				navigatePage : function(){
						var requestUrl = "PortalMainPageModule" ;
						this.sandbox.publish("PushHistoryState", {
                                hash: requestUrl
                            });
				},
 
 
				navigateUsrProfile : function(){
					var contactID = Terrasoft.SysValue.CURRENT_USER_CONTACT.value;
						var requestUrl = "#CardModuleV2/ContactPageV2/edit/" + contactID;
						this.sandbox.publish("PushHistoryState", {
                                hash: requestUrl
                            });
				},
 
				profileValidate: function(){
					this.console.log("REached via mandrill");
				var scope = this;
				var esq = Ext.create("Terrasoft.EntitySchemaQuery", {rootSchemaName: "Contact"});
				esq.addColumn("JobTitle");
				esq.filters.add("UserFilter", Terrasoft.createColumnFilterWithParameter(
			    Terrasoft.ComparisonType.EQUAL, "Id", Terrasoft.SysValue.CURRENT_USER_CONTACT.value
				));
 
			   esq.getEntityCollection(function(result) {
			   result.collection.each(function(item) { 
    		   var role = item.get("JobTitle");
    		   if(role === "" || role === " " || role === null){
        	   scope.console.log("Role logged after login:" + role);
        	   //scope.navigatePage();
        	   scope.navigateUsrProfile();
    		   }
    		   else{
    		   	//scope.navigateUsrProfile();
    		   	scope.console.log("Role without title :" + role);
    		   	scope.navigatePage();
    		   }
		      });
				}, this);
             },
			},
 
			diff: []
		};
	});





Please guide me on this.





Regards,

Bhoobalan P.

Like 0

Like

1 comments

Dear Bhoobalan,

 

Thank you a lot for the detailed description! I would be happy to help you with this issue but the behavior you described requires very detailed investigation and analysis. And it may even require an anonymized copy of the database. Please contact your manager directly so that he/she can arrange a developer consultation for you. Or you can contact support so they could assign a task to your manager

 

Best regards,

Angela

Show all comments