Nav webService Error NavNCLDialogException

ara3nara3n Member Posts: 9,256
edited 2010-10-26 in NAV Three Tier
Hello I ran into this problem with a client and wanted to put it here for others who might run into this.
I didn't find anywhere any information on this.

This issue is related to an addon that had code as follows


Message('You do not have permission to do this');
Error('');


when web service was running this process they would get the following error.

'Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLDialogException'

To solve this. I changed the code to

if isservicetier then
Error('You do not have permission to do this')
else
Message('You do not have permission to do this');
Error('');
Ahmed Rashed Amini
Independent Consultant/Developer


blog: https://dynamicsuser.net/nav/b/ara3n

Comments

  • ara3nara3n Member Posts: 9,256
    Does anybody have an idea why you would code this way
    Message('You do not have permission to do this');
    Error('');
    


    instead of
    Error('You do not have permission to do this');
    

    :-k
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • pfransenpfransen Member Posts: 7
    You would do this when the code is called from Codeunit 1.
    Codeunit 1 doesn't work correctly with errors, and tends to buffer them.
  • ara3nara3n Member Posts: 9,256
    Thanks.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.