There are cases when a screen does not need to show Tools button, and i would like to hide it from the users with no administration roles.
I tried reading through the ASPX file, however i haven't found a clue.
There are cases when a screen does not need to show Tools button, and i would like to hide it from the users with no administration roles.
I tried reading through the ASPX file, however i haven't found a clue.
The feature you are looking for is not part of the base product and is out of reach of customization. To implement it properly you should make a feature request with Acumatica.
That being said, it is technically possible to edit the page directly on the server at this path:
\Controls\PageTitle.ascx.cs
You can edit page load event to add your condition for tools menu. As an example I have made Tools menu visible only for Administrator role:
if (!Page.IsCallback)
{
Page.ClientScript.RegisterClientScriptBlock(GetType(), "toolbarNum", "var __toolbarID=\"" + this.tlbTools.ClientID + "\";", true);
// >> Add Tools menu condition
if (!PXContext.PXIdentity.User.IsInRole(PXAccess.GetAdministratorRoles().First()))
this.tlbTools.Visible = false;
// << Add Tools menu condition
}
It is technically possible to package this change in customization project by editing exclusion file list on server at this path:
/files.list
And remove the line for excluded file:
Controls\PageTitle.ascx.cs
After this you can add this modified file in customization project Files
section.
Be warned that this is not recommended because it replaces base product file instead of customizing it. This means you must update (maintenance) this file in your customization each time it changes in next Acumatica versions.
If you don't need a customization to deploy the change you can skip that part and only manually edit the PageTitle file on server. Note that Acumatica updates might revert that change.