Hello Everyone, I would like to ask if it is possible to hide/show this Print as PDF depends on the status? For example if the status is Pending this “Print as PDF” will be hidden if Completed the button will display.
Here`s my opportunity PDF Print Code in detailview vardefs:
Im trying to do exactly this, but for the convert lead if the user is a specific role or not.
Hide the menu button if user is ROLE = A, else we display the menu button.
Tried a few things, including the {if} in the detailviewdef under custom but sadly it dont seem to work.
Does someone have an idea how to make this to work ?
I can give you a generic answer, but I don’t have time to dig in to the specific of this view…
The code you put in the customCode is Smarty syntax, and the variables available to it are the ones that were assigned form the calling code.
The obvious ones are in that array fields which reflects what is in the vardefs. But if you need something else, like a role, you can only get there if the code setting up the screen does an assign of that value for you. You could customize the view to add that, if it’s not already there.
Thats what I tried, in the (custom folder) view.detail.php :
$this->ss->assign(“DISABLE_CONVERT_ACTION”, true);
and then in the detailview im trying to if/else this var.
Sadly and I rly dont understand why for now, in suitecrm V8 the display() function in view.detail.php is not fired. I assume angular completely change the way of adding custom code to a module