web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

(0) ShareShare
ReportReport
Posted on by 414

Hi All,

I am trying to extend existing data entity 'PurchPurchaseOrderLineV2Entity' .

I took below steps so far.

  1. Duplicated data entity 'PurchPurchaseOrderLineV2Entity' in project
  2. Extended staging table 'PurchPurchaseOrderLineV2Staging' in project
  3. Duplicated security Privileges into project 

Error message on building custom entity

2110.err.jpg

I have the same question (0)
  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi YOG,

    If you are extending the data entity, why did you create a copy of the entity? If you need a copy of the entity anyway, just delete part of the code where PurchInstrumentationLogger is used.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    If you extend a data entity, you need to create Data entity extension, and table extension for the staging table.

    On the other hand, if you decide to duplicate the entity instead of extending it, you need to duplicate the entity and the staging table.

    Class PurchInstrumentationLogger is marked as internal so you can't use it from your own objects (such as entities).

  • YOG Profile Picture
    414 on at

    Hi Sergei,

    Thanks for your message.

    I will try removing the code.

    Please can you help me understand  part of your message 'Why did you create a copy of the entity?'

    I normally duplicate entity to my project and create extension of staging table when i have amend standard data entity.

    Is there any other way to do this too?

    Regards,

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi YOG,

    Check comment from Nikolaos. If you make a copy of an entity, it's safer to make a copy of the staging table as well. At least you don't depend on MS changes.

    But if you just need to add several fields it's better to create extensions for both cases.

  • YOG Profile Picture
    414 on at

    hi Nikolaos,

    Thank you for your message.

    I am not getting duplicate option for staging table and therefore i am creating extension for it. whereas i get duplicate option for 'Target Entity' and therefore i am using it to duplicate

    am i missing any thing.

    please see two pictures as below

    Staging Table

    5621.Staging-table.jpg

    Target Entity

    7658.Entity.jpg

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi YOG,

    Looks like you haven't open or created a project before or model associated with project missing reference to ApplicationSuite.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    "Duplicate in project" is only available if you have a project open in VS.

  • YOG Profile Picture
    414 on at

    Hi Sergei/Nikolaos,

    Sergei -- I do have project and model parameters 'Application suite' assigned to it. please see screenshot below

    Nikolaos -- thanks. I can see duplicate option.

    How do I delete the code? i can see error message '

    dynamics://Table/CAPPurchaseOrderLinesV2Entity/Method/insert(748,29):  NonPublicClassInaccessible: The method 'createLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible.

    and it is under 'Insert' method

    1616.err.jpg

    8407.Code.jpg

    Model para

    5282.Para.jpg

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    About the error message, just delete the insert method and the error will go away.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Moved to D365 Finance forum.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans