Currently as per current implementation of the Entity permissions [read update create delete]
If user is granted [read] permission he will be able to see View Button
If user is granted [update] permission he will be able to see Edit Button
If user is granted [read update] permission he will be able to see Edit Button without View Button
Is their is a way to show both buttons other than adding below code snipt
Cause if the user is granted the read only mode when he open the browser screen he will see two view buttons one which is reversing Edit button to View the other one is the View action which is defined inside XML
No, because these are different actions: edit and view. In case a user has no permission to UPDATE an entity, the edit action changes its caption in the refreshState() method:
If you want to have two actions edit and view if a user has permission to UPDATE an entity and only one otherwise, I would recommend making one of the actions invisible programmatically in a screen controller, e.g.: