no permission to modify records

kevin.7710
Member Posts: 40
how to solve "you have not permission to modify records in Purch. Inv. Header".
I wirte a new codeunit and create a funcation called PurchInvHeaderEdit
PurchInvheaderEdit(Rec : Record "Purch. Inv. Header")
Code below
PurchInvHeader := Rec;
PurchInvHeader.LOCKTABLE;
PurchInvHeader.FIND;
xRecRef.GETTABLE(PurchInvHeader);
PurchInvHeader."Bill of Lading No." := Rec."Bill of Lading No.";
PurchInvHeader.MODIFY;
Rec := PurchInvHeader;
RecRef.GETTABLE(PurchInvHeader);
ChangeLogMgt.LogModification(RecRef,xRecRef);
Then I change Posted Purchase Invocie form's OnModifyRecord trigger
CODEUNIT.RUN(CODEUNIT::"PurchInvHeaderEdit",Rec);
EXIT(True);
Please give me help.thanks!
I wirte a new codeunit and create a funcation called PurchInvHeaderEdit
PurchInvheaderEdit(Rec : Record "Purch. Inv. Header")
Code below
PurchInvHeader := Rec;
PurchInvHeader.LOCKTABLE;
PurchInvHeader.FIND;
xRecRef.GETTABLE(PurchInvHeader);
PurchInvHeader."Bill of Lading No." := Rec."Bill of Lading No.";
PurchInvHeader.MODIFY;
Rec := PurchInvHeader;
RecRef.GETTABLE(PurchInvHeader);
ChangeLogMgt.LogModification(RecRef,xRecRef);
Then I change Posted Purchase Invocie form's OnModifyRecord trigger
CODEUNIT.RUN(CODEUNIT::"PurchInvHeaderEdit",Rec);
EXIT(True);
Please give me help.thanks!
0
Comments
-
Did you set the permissions on your codeunit to allow edit of the table?Analyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0 -
I already added the permission. but the error till exist.0
-
Hi,Belias.Can you describe in more detail? Thanks0
-
verify what role are you using, then click tools>security>roles
select your role, click role>permissions, find the table you're trying to modify and give it at least an indirect permission on write column..
btw, what value does your permission property has?0 -
my role settings are: All, Super (Data), Super0
-
i think you're a developer...in that case you should toggle the "all" role from your user (and ONLY from your user)...then syncronize if you're on sql..(it can takes a long of time if there are a lot of users)
EDIT: i didn't read carefully...you need ONLY the "super" role, so you should also toggle the super(data) role from your user's roles0 -
Belias, Thanks. I move this code to OnRun Tirgger. Now it will modify the table.0
-
Can you change your topic-title to a title that is descriptive.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Changed title from [Please help,urgent!!] to [no permission to modify records]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions