Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Which class is the best way to debug data entity import ?

(0) ShareShare
ReportReport
Posted on by 592

Hi all,

If we're facing error while import data using Data Management, staging table is inserted successfully, where is the best place to put breakpoint to start trace the issue ?

Thanks,

  • Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    RE: Which class is the best way to debug data entity import ?

    All right, let me explicitly state the name of the entity you want to talk about: SystemSecurityRoleCustomizationsEntity. It'll make it clear for people trying to help you, it'll allow copying the name and it'll also allow search engines to find this thread if someone is looking for information about this entity. Next time, please share such information as the very beginning.

    The first thing I would debug is persistEntity() method of SystemSecurityRoleCustomizationsEntity.

  • Voltes Profile Picture
    Voltes 592 on at
    RE: Which class is the best way to debug data entity import ?

    This is not custom entity and it is not being modified either ->

    pastedimage1675752961120v1.png

  • Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    RE: Which class is the best way to debug data entity import ?

    It seems that you're talking about a custom entity and you didn't do enough debugging to know where the error is thrown.

    I know nothing about code of your custom entity, therefore it's impossible to comment on it. If you have some code in mapEntityToDatasource() or so, definitely put a breakpoint there.

    You can also add a breakpoint to Info.add (and enable debugging of Application Platform module). Then attach the debugger to the web server (usually IIS Express) and run the import directly (not in batch). If you used a batch, you'd have to attach the debugger to batch.exe). It may stop on a breakpoint or an exception.

  • Voltes Profile Picture
    Voltes 592 on at
    RE: Which class is the best way to debug data entity import ?

    Hi Martin,

    Thanks, this is actually related to my other thread ->

    community.dynamics.com/.../data-entity-for-import-security-privileges

    At the last thread from me about import Security Role, where by I have error when using data entity : Security role metadata customizations entity

    So when trying to move from staging to target table, it is throwing this error:

    pastedimage1675751436659v1.png

    That "TRYROLEA" is my role which I have imported at 1st sequence before this "problematic" data entity. So I want to know what object it need ?

    Basically I just want to import new Role, which later will need to import Duty -> Privileges -> Permissions. 

    Thanks,

  • Martin Dráb Profile Picture
    Martin Dráb 230,962 Most Valuable Professional on at
    RE: Which class is the best way to debug data entity import ?

    There is no unviersal best place for all possible errors. You really should take into account what error you're getting and where.

    If you want out help with it, please share the error message with us and the line of code throwing it (if you were able to find it).

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,162 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans