hougaard / Simple-Object-Designer

Issue tracking for the Simple Object Designer for Business Central
7 stars 0 forks source link

Item Ledger Entry Insert Permission #305

Open izon-dmitry opened 9 months ago

izon-dmitry commented 9 months ago

Hi Erik

I am experiencing a permission issue when creating new records in the Item Ledger Entry (32) table:

{
    "error": {
        "code": "Internal_ServerError",
        "message":"Sorry, the current permissions prevented the action. (TableData Item Ledger Entry Insert: My App)  CorrelationId:  dd89ed46-0bfc-43ae-a5d8-528d8389aee2."
    }
}

I created a permission set with insert permission for my desired table and assigned it to the Azure AD application as mentioned in issue #149. But results in the same permission error.

Unfortunately, I am not very familiar with Business Central. Is inserting into that table only possible by another function or something? Any insights would be appreciated.

Thanks!

hougaard commented 9 months ago

Item Ledger Entry is a "protected posting table", only posting routines are allowed to write to those tables.

The solution is to write an Item Journal Line and then post that.