Hi,
I have some XUI code that is brought up by the push of a XUI button. Recently the need has come up to opendocuments in readonly mode. I would like to have the XUI button hidden if the document is read only, is this possible?
I have found that I can test for read only and the button will do nothing withjavascript code:
if (Acl.eval("doc_read_only()") > 0 )
{ Application.alert("READ ONLY : Can't edit"); }
But it would be nicer if the button didn't appear at all.
Thanks, Ellen
All,
In addition to what has been said, the "doc_read_only()" function is not reliable. I turned in a call on it some years ago with Epic 4.3. It worked fine with 4.2.?, but 4.3 or 4.4 broke it. It hasn't worked right since. I can't find the Call # since it was logged when I worked for an organization called FCDIT. I used to use the function extensively to tell the user about cerntain functionality not being available when the user either did not have access to write at the location of the document, or the document had the read-only bit set, or the document was the result of a comparison. All three conditions produced a "1" or true for the function.
When the function was broken, I had to use the "access" function to test the document, which was a lot more combersome in coding.
Anyway, just my 2 cents.
Bob
In Reply to Ellen Headrick:
Hi,
I have some XUI code that is brought up by the push of a XUI button. Recently the need has come up to opendocuments in readonly mode. I would like to have the XUI button hidden if the document is read only, is this possible?
I have found that I can test for read only and the button will do nothing withjavascript code:
if (Acl.eval("doc_read_only()") > 0 )
{ Application.alert("READ ONLY : Can't edit"); }But it would be nicer if the button didn't appear at all.
Thanks, Ellen