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
  • thank you Francesca,
    I didn't explain it very well

    I need to use my static funtion because i have to respect other conditions
    for example i am not allow to go to back to the status "NEW" if the status is different to "NEW",  so i need to know the previous status  (i retrieve it from my static function and i return the correct message to give to user) and not only the current status ....for this reason i am using app.api.call
    Please can you give me any advise?....i'm a beginner on Sugar   Ciao
Reply
  • thank you Francesca,
    I didn't explain it very well

    I need to use my static funtion because i have to respect other conditions
    for example i am not allow to go to back to the status "NEW" if the status is different to "NEW",  so i need to know the previous status  (i retrieve it from my static function and i return the correct message to give to user) and not only the current status ....for this reason i am using app.api.call
    Please can you give me any advise?....i'm a beginner on Sugar   Ciao
Children