telecastg thank you for your attention. No, not in the dropdown. I have entities, where I have calculations, that only recalculate when saved or after browser refresh. Sometimes need to be recalculated, which is possible only with admin rights.
In the beginning of this thread Maximus provided a code extension to make a button in an entity. You complemented that code, so it works as desired for admin.
But I need it for any user and wondered, if this could be possible by adapting the former code in this thread.
I want to avoid too many clicks in different locations or even refresh the browser itself. My users would not get that. If I provide them this button, they get it.
For admin it looks like this:
Possibility to recalculate the formulas by formula?
Collapse
X
-
Hi,
my question complements my question in another thread -> https://forum.espocrm.com/forum/gene...to-recalculate, because the solution of this thread here about the button also does work only for admin.
I asked myself, if it could be possible to adapt the script for the button to the possibility for a regular user use the recalculate and refresh browser button.
This question goes mainly to our helpful friends telecastg and Maximus.Leave a comment:
-
> I actually would even prefer this button on the bottom of my form in the detail view, but I don`t know, if that is even possible. If it would be possible, perhaps any idea, how to achieve this?
It needs more complicated customizations as it needs to create a custom template. etc. etc.
Leave a comment:
-
My intention actually was to have this function like a button to avoid one mouseclick (that would be necessary if this function would be in the dropdown). I would like to offer the user after having filled the form to do the recalculation immediately.
Without wanting to be too demanding, I actually would even prefer this button on the bottom of my form in the detail view, but I don`t know, if that is even possible. If it would be possible, perhaps any idea, how to achieve this?Leave a comment:
-
For sure there is an ability to add the Recalculate Formula action to the Dropdown menu. But anyway for making such customization properly, you will need to create it somewhere in the /client/custom/... directory, and specify the path to this new view in many others JSON files https://docs.espocrm.com/development...in-detail-view.
The task was to create a button. I believe this logic is acceptable for the dropdown menu as well.
> But certain other default button such as "Duplicate", "Remove", "Print to PDF", I think it all use one single file handler isn't it
Please investigate this file /client/src/views/record/detail.js.Leave a comment:
-
But certain other default button such as "Duplicate", "Remove", "Print to PDF", I think it all use one single file handler isn't it, is it not possible to make it dynamic?Leave a comment:
-
Yep. You can describe such logic for all entities in one .js file, but each entity needs its own .json file with to specify the pass to this .js file.Leave a comment:
-
OK, after playing around with it I think (hopefully it correct) that I can answer some of my own question.
1) Can't append multiple scope I believe. Each entity need to have a [Name].json (e.g. Contact.json)
Button handler can't be shared either so need to be create individually for each Entity due to this code:
"Espo.Ajax.postRequest('Basic/' +"
Basic is the Entity name.Last edited by esforim; 11-11-2020, 12:03 AM. -
How to add this for Base Plus type? None of the code seem to mention "Base" directly.
For example I know I need to change this section if I want to use this for Contact (which is a Base Plus? or probably Person)
The type can be found here: https://docs.espocrm.com/development...a/scopes/#type
But where do I add BasePlus in the code?
Is it possible to append multiple aclScope?Code:"aclScope": "Contact",
Rather than having multiple files of same code.Code:"aclScope": "Contact", "Account", "Case",
Last edited by esforim; 11-10-2020, 11:51 PM.Leave a comment:
-
Hi,
thank you for all the help, but unfortunately, so far none of them (tried also various combinations) will work.Leave a comment:

Leave a comment: