Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

XML Import Employee Department

Posted on by 205

We created XMLPort to import Employee Departments.

However we are getting error

The field No. of table Default Dimension contains a value 'XXXXX' that can not be found in related table (Employee)

Any hint please.

Categories:
  • Mohammed Marhoon Profile Picture
    Mohammed Marhoon 205 on at
    RE: XML Import Employee Department

    Its part of the default CodeUnit 408 DimensionManagement and part of SaveDefaultDim Function

    See the error stop in which line  11

    1SaveDefaultDim(TableID : Integer;No : Code;FieldNumber : Integer;ShortcutDimCode : Code)

    2  GetGLSetup;

    3  IF ShortcutDimCode <> '' THEN BEGIN

    4    IF DefaultDim.GET(TableID,No,GLSetupShortcutDimCode[FieldNumber])

    5    THEN BEGIN

    6      DefaultDim.VALIDATE("Dimension Value Code",ShortcutDimCode);

    7      DefaultDim.MODIFY;

    8    END ELSE BEGIN

    9      DefaultDim.INIT;

    10      DefaultDim.VALIDATE("Table ID",TableID);

    11      DefaultDim.VALIDATE("No.",No); = >>>> Error Stop in this Line

    12      DefaultDim.VALIDATE("Dimension Code",GLSetupShortcutDimCode[FieldNumber]);

    13      DefaultDim.VALIDATE("Dimension Value Code",ShortcutDimCode);

    14      DefaultDim.INSERT;

    15    END;

    16  END ELSE

    17    IF DefaultDim.GET(TableID,No,GLSetupShortcutDimCode[FieldNumber]) THEN

    18      DefaultDim.DELETE;

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,155 on at
    RE: XML Import Employee Department

    Is the xml port looking to handle the default dimension table? Looks like the validation code of default dimension is run before the insert(); on the employee table has run

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans