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
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