From: Kine on
Same answer for you Gottfried: You cannot save object with permission to
Sales Invoice Header if you have just Application Builder Granule. It is
protected table and thus you cannot edit objects with indirect rights to this
table.

Kine

"Gottfried Mayer" wrote:

> PlingPHB schrieb:
> > I've modified the Sales Invoice Header table (112) to include a number of new
> > fields, which are transfered from the Sales Header table (36) when the Sale
> > is posted. I need to be able to update these new fields after the Sale has
> > been posted - however trying to do so gives "You do not have permission to
> > modify records in the Sales Invoice Header table." error.
> >
> > I only want to modify the fields I've added to the table, not the existing
> > ones. I've looked at the Sales Inv.-Printed codeunit (315) but I can find no
> > way to use it's permissions on another codeunit to enable editing - I still
> > get the same error.
> >
> > Can someone suggest where I might be going wrong? I'll admit my
> > understanding of Navision's use of Permissions isn't my strong point!
> >
> > Thanks,
> > --
> > !PHB
>
> Hi PlingPHB,
>
> The pointer of Savatage to CU391 is very good, but here is what I would do:
>
> - Design Codeunit 391 and "Save As" to 50000 or whereever you have
> permissions to create a new Codeunit.
> - Design the new Codeunit and change the following things:
> - Change the PROPERTIES of the Codeunit:
> - Add Modify - Permissions to the Sales Invoice Header
> - Change the TableNo to Sales Invoice Header
> - Add a Global Variable "SalesInvoiceHeader" (or whatever name you
> want) to the Codeunit
> - Modify the OnRun Trigger (there is only this one trigger in the CU)
> to transfer the Fields you want to be editable (Just take the
> current code as a template.
>
> The rest should be obvious (look at the Posted Sales Shipment Form)
>
>
> HTH
> Gottfried
>
From: marcin on
Hi Kamil,
You are right. PHB won't do it with AB licence. His mail was later :-).

Cheers,
Marcin


Kamil Sacek (Kine) wrote:
> Marcin, this is not possible to do with Application builder granule. You need
> to have solution developer to be able to add permissions for "protected"
> tables (posted documents, entries)...

From: Marlin Parisien[MSFT] on
Hi PHB,

I spoke with a colleague who is great with licensing and this is what she
had to say about this issue;

The Sales Invoice Header table is a protected table, which users cannot
make changes to. All posted document and ledger tables are protected as you
do not want users to make changes to posted data, which would compromise
the integrity of the system. The only way for a customer to get access to
protected tables is to buy the Solution Developer granule.

If the customer bought the Sales Invoicing granule they receive indirect
permissions for the posted sales document tables which you will see as
lower case permissions on the customer?s license configuration file (rimd).
If the customer has direct permissions to a table this will show with upper
case letters (RIMD). That a customer has indirect permissions to a table
means that they cannot change the data in the table directly, but you can
however give for example a codeunit permissions to change the data in the
table. If you look at for example codeunit 80 ? Sales-Post you will see
that this codeunit has permissions to Insert, Modify, and Delete in table
112 ? Sales Invoice Header, which means that even though the customer?s
license doesn?t give the customer permissions to directly insert and modify
records in the Sales Invoice Header table codeunit 80 will be able to
insert and modify records into the table when a sales invoice is posted.

You can use this functionality to modify fields on the Posted Sales Invoice
form as well and this has already been done on the Posted Sales Shipment
form where you can change the Package Tracking No, Shipping Agent Code, and
Shipping Agent Service Code fields. This is done by having a codeunit make
the changes and by giving this codeunit permissions to the Sales Shipment
Header table. If you want your customer to be able to modify fields on the
Posted Sales Invoice form you can create functionality similar to what has
been done for the Posted Sales Shipment form. You can use the same codeunit
as is used on the Posted Sales Shipment form, codeunit 391 ? Shipment
Header - Edit, and add a new function to this codeunit where you change the
fields in the Sales Invoice Header table and give the codeunit permissions
for the Sales Invoice Header table as well or you can create a new codeunit
for this functionality. The codeunit is called from the OnModifyRecord
trigger on the Posted Sales Shipment form.

If you want more information about the Application Builder granule you can
find it in KB article 878370.

"Protected tables" refers to those tables that can only be written to by
objects with special permissions set. These tables are generally the Ledger
Entry tables and the Register tables, and certain history tables. The
objects that have permission to update these tables (posting routines and
adjustment routines for example) can only be created or modified by users
who have the Solution Developer granule.

With the Application Builder Granule you can only modify tables that are
not protected tables. The Sales Invoice Header table is a protected table
(history table).

I hope this helps and if you have further questions in regards to this, you
may want to create a support request through MBS support.

Regards,

Marlin Parisien
Microsoft Online Support Engineer
Get Secure! - www.microsoft.com/security

=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights
From: PlingPHB on
Thanks for your advice everyone. Looks like I'm going to have to work on the
boss to persuade them just how good value the Solution Developer granule is!!
--
!PHB

From: Savatage on
"Marlin Parisien[MSFT]" wrote:

If you look at for example codeunit 80 – Sales-Post you will see
> that this codeunit has permissions to Insert, Modify, and Delete in table
> 112 – Sales Invoice Header, which means that even though the customer's
> license doesn't give the customer permissions to directly insert and modify
> records in the Sales Invoice Header table codeunit 80 will be able to
> insert and modify records into the table when a sales invoice is posted.

The point is adding custom fields to modify - It's easy to make changes
before you post but that's is not always the case. There are many changeable
fields on posted invoices. such as "On Hold" for example. Changing
everything on posted invoices is obviously unwize but there are occasions
where a customer needs a custom text box or boolean that they use to help
their business. This in no way hurts the intergrity of the posted invoice.

As my first post suggest you can add a custom field an make it changable
very easily without a bunch of codeunit changes.

navision invoices are deleteable so there are not the last line of defense.
The reportable data is stored in the customer ledger entries and item ledger
entries not the sale invoices.