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

  • YOG Profile Picture
    414 on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Thank you Sergei 

    This has resolved my issue.

    I was following incorrect steps as below. I was educated in this way

    1. Created extension for the entity and related staging table

    2. Added PurchReceivedNow field from datasource to Entity fields

    3. Create 'PurchReceivedNow' column under Staging table

    4. Build Solution

    Thank you Nikolaos for your help too.

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,091 on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Hi YOG,

    Quickly tried to add the field in my environment and it works.

    1. Created extension for the entity and related staging table

    2. Added PurchReceivedNow field to entity and staging

    2.1. For staging, I copied and pasted field from PurchLine

    2.2. For entity drag'n'dropped field from the data source

    3. Build a solution

    4. Synchronize

    No errors, the field is visible in oData

    Do you have any other customizations for entity or staging?

  • YOG Profile Picture
    414 on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Hi Sergei,

    this is in 10.0.8 (update 32)

  • Sergei Minozhenko Profile Picture
    23,091 on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Hi YOG,

    Which PU version are you using? I think i saw this issue before in 10.0.4 (PU28)

  • YOG Profile Picture
    414 on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    hi Nikolaos.

    I have check production environment and Odata working ok.

    Extended data entity works ok with data management. I can export and Import too.

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Then I suggest you try the same in your test system (where you don't have the changes that you are developing in your dev system currently). Do you get the same error there? If yes, then it's not related to your changes but of course needs to be investigated. But in that case it's not related to our current topic in any way and you can post a new question if you need help.

    Another thing, did you so far export this entity succesfully using data management? If not, perhaps this error is indeed related to your developments.

    In either case you need to analyze and collect more information.

  • YOG Profile Picture
    414 on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Hi Nikolaos,

    I am getting error.

    2804.err.JPG

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    I'm sorry, you actually need to look for /data/PurchaseOrderLinesV2. Otherwise it's using the old entity and that's not where your fields are.

    You see this in the Public collection name property of the entity.

  • YOG Profile Picture
    414 on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Hi NIkolaos,

    Field is not available in OData endpoint too.

    It is only available in data entity. I have tried using it through data management and it works ok.

    Please see two screenshots as below

    Data entity Mapping

    Entity-View.JPG

    ODataEndPoint 

    1778.odata.JPG

  • nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: The method 'CreateLogger' contained in the non-public class 'PurchInstrumentationLogger' is inaccessible

    Are you sure it's not available in Excel? If it's available in Data management, I would definetely expect it to be available via OData (which the Open in Excel is using).

    Could you see if you see it in the OData endpoint directly?

    Navigate with your browser to https://[yourDynamicsURL]/data/PurchaseOrderLines

    Do you see the field in the result?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,283 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans