Hide 'Cannot execute the specified command' message

Hi All,

I have an Edit button with this Formula inside:

@Command( [EditDocument]; “1” );

@Command( [ViewRefreshFields] )

And, I have some script in the form’s Querymodechange which can stop the form from being edited.

The problem is, if the script in Querymodechange return false, the form will stop from turning to Edit mode - this is what I want but there are a message appear - ‘Cannot execute the specified command’.

I believe that this message is propmt because of the usage of @command in the edit button.

I don’t want this message and how can I disable it whithout changing the edit button code from formula to script?

Thanks in advance.

Subject: Only a few lines of code

It is just a few lines of Lotusscript code, I would rewrite it. That would take no more than 60 seconds, much less time than you would spend on work-arounds…

Subject: Simple change to your formula…

Many @commands actually return @true or @false depending on whether or not they succeeded.You can make the refresh only run if the switch to edit mode succeeded with this formula:

@If(@Command([EditDocument]; “1”); @Command([ViewRefreshFields]); “”)