NAS and Permissions

hest74hest74 Member Posts: 2
I have a problem modifying a sales Invoice Header record via the NAS.

I have a report with the following configuration
Report properties
Permissions : TableData Sales Invoice Header=rimd
Sales Invoice Header - OnAftergetrecord :
"Sales Invoice Header"."Bill-to Name" := '...';
IF "Sales Invoice Header".MODIFY THEN
MESSAGE('OK')
ELSE
ERROR('Shit');

When I run this report via the normal client (with the windows user that runs the NAS) I get OK
When I run it in the NAS I get Shit

I've a NAV 4.0 SP1 on a SQL 2000

Anyone any ID?

Comments

  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    did you check your application log? It might give you more information about the reason why you are getting the error.

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • Alex_ChowAlex_Chow Member Posts: 5,063
    You cannot have any display values when using NAS.

    So take out the MESSAGE and ERROR and try your process again.
  • DenSterDenSter Member Posts: 8,304
    MESSAGE and ERROR goes to the event log. Using either in NAS wouldn't cause the MODIFY to fail.
  • KYDutchieKYDutchie Member Posts: 345
    Also, do you have the correct license loaded?
    Make sure you are using the customers license and not the Cronus License.

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • garakgarak Member Posts: 3,263
    Messges and Errors are not a problem for the NAS. Thes infos are stored in the EventLog of the Windows System.
    NAS has only probs with Dialog and Confirm (he waiting for someone there press YES for him :-) )

    To see why the NAS say ever "shit", change your source form
    IF "Sales Invoice Header".MODIFY THEN
    

    to
    "Sales Invoice Header".MODIFY
    

    So, if there is an error (maybe a message like "A other user has changed this record after displaying ...") you can see this error in the EventLog of the Windows System.

    If you use NAS >= 5 u can also use the function GetLastErrorText (C/AL Symbol Menu -> System -> Error Handling)

    Regards
    Do you make it right, it works too!
  • krikikriki Member, Moderator Posts: 9,110
    In case you are using the customers license, you will get the error. Only developpers-licenses have permission to modify table "Sales Invoice Header".
    If you want that the NAS can MODIFY that table, you need to give permissions in the object that does it.
    Each object has a property "permissions". In this you need to define that the object has permissions to MODIFY table "Sales Invoice Header".
    The windows-login of the NAS needs a permission (a full permission or also indirect permission) to change table "Sales Invoice Header".
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.