Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By sgkalluri
#793181
Hello there,

The Home page is the first one that a user normally lands on immediately after logging in to PM.

Now, I have created a plugin called Reports, which becomes a Menu option in addition to the Home Menu option. By clicking on the Reports Menu option a user goes to a new page where various charts and reports are displayed using the BIRT reporting engine.

Is there a way for a user to land on the above said Reports page immediately after logging in instead of the default Home page? This is to ensure that the user first sees the overall picture by way of summary charts and reports, and then goes to the details as displayed on the Home page.

Best wishes,
SGK
User avatar
By amosbatto
#793233
When you edit the profile for a user, there is a dropdown "Default Main Menu Option" to select the default menu when logging in.
Does your custom "Reports" page appear when logging in?
By sgkalluri
#793239
No it does not Amos. Only the usual Home, Dashboards, Designer and Admin options come up. - SGK
By sgkalluri
#793262
Hello Amos,

I stumbled upon the code to enable this feature. It is in the section called as 'Redirect After Login' in the Plugin Development link http://wiki.processmaker.com/3.0/Plugin_Development.

The text of that section goes like this...
.
.
.

Redirect after Login

If a new role and permission has been created in the previous step, a further question will be asked whether to redirect users with that role to a specified page after logging into ProcessMaker. To redirect, enter "y" at this option:

Create a Redirect Login for the Role 'PROCESSMAKER_pluginName' [y/N]:
Entering "y" will add code like the following to the pluginName.php file:

function setup() {
$this->redirectLogin('PROCESSMAKER_DELETECASES', 'users/users_List');
}
By default, the plugin redirects to the user's list, but this can be changed. For example, for all users with the PROCESSMAKER_DELETECASES role to be redirected to thedeleteCases/deleteCasesApplication.php page on login:

$this->redirectLogin('PROCESSMAKER_DELETECASES', 'deleteCases/deleteCasesApplication');

.
.
.

So, I changed the last line to the following in the relevant file...

$this->redirectLogin("PROCESSMAKER_OPERATOR", "Reports/ReportsApplication");

where 'Reports' is the custom plugin name that I had created, and 'ReportsApplication' is a php file that gets created automatically when the custom plugin is created.

And, this change worked.

Best wishes,
SGK

I have a suggest where user have to select some do[…]

The 500 Internal Server Error is the general catch[…]

Really very nice blog information for this one and[…]

This is a long, lengthy and cumbersome process. T[…]