how to prevent module editing depending on status 'Completed'

I am a beginner on Sugar...

My target is prevent module editing.

I wrote down ......this.$('.record-edit-link-wrapper').remove(); 
 and it works....
but i want to disabled icon-pencil (it is my biggest problem) on each field ....In order to prevent editing if status is Completed...
How can do it?
Sugar 7.5.1 pro
Parents
  • Hi Luca,

    What version of Sugar are you working on?
    There are a lot of ways to do this. 

    If you want the whole record to be not editable, the most simple way I can think of to do this, that works on both 6 and 7, is via "before_save" logichook. In your hook, you can do the condition checking and throw a Sugar Exception to prevent the changes from being saved. 

    If you only want to make some fields not editable, then, dependencies are more suited for the job.


    Regards!

Reply
  • Hi Luca,

    What version of Sugar are you working on?
    There are a lot of ways to do this. 

    If you want the whole record to be not editable, the most simple way I can think of to do this, that works on both 6 and 7, is via "before_save" logichook. In your hook, you can do the condition checking and throw a Sugar Exception to prevent the changes from being saved. 

    If you only want to make some fields not editable, then, dependencies are more suited for the job.


    Regards!

Children
No Data