Trying to modify record on Sales invoice Header Business Central

AordonezAordonez Posts: 8Member
edited 2019-04-13 in NAV Three Tier
Hello i am trying to Update come fields on one record for table "Sales Invoice Header" by code, but when it reach my modify(false); i got the error "You do not have the following permissions on TableData Sales Invoice Header: Modify. To view details about your permissions, see the Effective Permissions page. To report a problem, refer to the following server session ID: '91'."

Is there a way to achieve this?

Put my code for more references

if success then begin
salesInvcHdr."Fiscal Invoice Number PAC" := uuid;
salesInvcHdr."Date/Time Stamped" := Format(Today);
salesInvcHdr."Date/Time Sent" := Format(Today);
salesInvcHdr."Error Code" := '';
salesInvcHdr."Error Description" := '';
salesInvcHdr."Electronic Document Status" := stampStatus::"Stamp Received";
else begin
salesInvcHdr."Fiscal Invoice Number PAC" := '';
salesInvcHdr."Date/Time Stamped" := '';
salesInvcHdr."Date/Time Sent" := '';
salesInvcHdr."Error Code" := '99';
salesInvcHdr."Error Description" := errMsg;
salesInvcHdr."Electronic Document Status" := stampStatus::"Stamp Request Error";

Thanks in advance

Best Answer


  • RobyRRobyR ItalyPosts: 15Member
    Did you tried explicit the table permissions on your codeunit? This may solve your issue
  • AordonezAordonez Posts: 8Member
    How can i achieve this? i already validate by code the write permissions and the procedure returns me false
  • RobyRRobyR ItalyPosts: 15Member
    > @Aordonez said:
    > How can i achieve this? i already validate by code the write permissions and the procedure returns me false

    Did you explicitly write Modify permissions for the sales invoice header on your codeunit, and nothing changed? Are you in Business Central on Prem or SaaS?
  • AordonezAordonez Posts: 8Member
    SaaS do you have an example for this?
  • AordonezAordonez Posts: 8Member
    Thanks so much!!!
  • RobyRRobyR ItalyPosts: 15Member
    Your welcome 👍
  • AordonezAordonez Posts: 8Member
    Roby one last doubt i need to update different table on the same codeunit how can i grant permissions for all the tables?
  • TallyHoTallyHo Posts: 156Member

    Permissions = 0 = RIMD;
    Permissions = "0" = RIMD;

    If this is not working, it is probable not possible.
Sign In or Register to comment.