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!
0
Comments
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
edit: ...4 the roles that need it
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
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?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
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 roles
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!