Options

Permission to modify Posted Table Header Field

IrishGiriIrishGiri Member Posts: 61
Hi all,

I've added a Boolean Text Box called Invoice Paid to the the header of the Purch. Invoice Header Table. Simple check box. However, when I try to exit the form after ticking the check box, I get a popup error message which reads:
You do not have permission to modify records in the Purch. Inv. Header Table. Contact the System Manager if you need to have your permissions changed

Any help with this is appreciated,

Cheers,
Paul.

Comments

  • IrishGiriIrishGiri Member Posts: 61
    I should add that I only want to allow the user permission to modify only this check box i.e. I don't want to allow permission for the user to modify the whole object/form. :lol:
  • IrishGiriIrishGiri Member Posts: 61
    I should add that I only want to allow the user to modify the text box i.e. I don't want to give the user permission to modify the whole form/header.

    Cheers!
  • MbadMbad Member Posts: 344
    You will need to be more specific. The error isnt comming from the checkbox since anyone can put in a new field in 4.0 Purch Inv Header and check it.
  • krikikriki Member, Moderator Posts: 9,120
    With the customer license, you cannot modify some tables (like posted purchase header).
    The best (safest) way is to do like Form 130:"Posted Sales Shipment". In it you have some fields enabled.
    In the "Form - OnModifyRecord()"-trigger, you call a codeunit that really writes the changed field (and ONLY that field) to the DB.
    In the codeunit, you also have to put a permission (with property permission) to modify the posted purchase header-table.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • MbadMbad Member Posts: 344
    Ahh yes. Damn those big keys.
  • SavatageSavatage Member Posts: 7,142
    For us I would have to modify
    Codeunit 391

    and on the trigger
    PurchaseInvoiceHeaderEdit(PurchInvoiceHeader : Record "Purch. Inv. Header")


    you would have to add..
    PurchInvoiceHeader2."Invoice PAID" := PurchInvoiceHeader."Invoice PAID";
    

    Note: there are other ways of keeping track of Invoices and if they are paid. 8)
  • David_CoxDavid_Cox Member Posts: 509
    Codeunit 391 is "Shipment Header - Edit" in the GB Database :lol:

    If it is the same in yours, look at the Sales Shipment Form (OnModify) and Codeunit 391 Shipment Header - Edit

    Look at the code, you can add a tracking number to the shipment header.
    You will need to do the same for your new field, this is the proper way, if you want to modify a posted document or a Ledger (113 Vend. Entry-Edit).
    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.com
Sign In or Register to comment.