Trying to modify record on Sales invoice Header Business Central
Aordonez
Member Posts: 8
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
salesInvcHdr.Reset();
salesInvcHdr.get(idDoc);
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";
end
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";
end;
salesInvcHdr.Modify(false);
Thanks in advance
Is there a way to achieve this?
Put my code for more references
salesInvcHdr.Reset();
salesInvcHdr.get(idDoc);
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";
end
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";
end;
salesInvcHdr.Modify(false);
Thanks in advance
0
Best Answer
-
Easily add:
Permissions = tabledata "Sales Invoice Header" = RIMD;
At the beginning of your object, for example:
Codeunit 50100 YourCodeunit
{
Permissions = tabledata "Sales Invoice Header" = RIMD;
/*...your code...*/
}5
Answers
-
Did you tried explicit the table permissions on your codeunit? This may solve your issue0
-
How can i achieve this? i already validate by code the write permissions and the procedure returns me false0
-
> @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?0 -
SaaS do you have an example for this?0
-
Easily add:
Permissions = tabledata "Sales Invoice Header" = RIMD;
At the beginning of your object, for example:
Codeunit 50100 YourCodeunit
{
Permissions = tabledata "Sales Invoice Header" = RIMD;
/*...your code...*/
}5 -
Thanks so much!!!1
-
Your welcome 👍0
-
Roby one last doubt i need to update different table on the same codeunit how can i grant permissions for all the tables?1
-
Try
Permissions = 0 = RIMD;
or
Permissions = "0" = RIMD;
If this is not working, it is probable not possible.0 -
> @Aordonez said:
> Roby one last doubt i need to update different table on the same codeunit how can i grant permissions for all the tables?
I don't know if TallyHo solutions works, on c\al was necessary to specify each permission, try with TallyHo solution or specify permissions for each table separated by comma0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

