Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Min/Max Import through DMF

Posted on by 2,420

Good Morning,

There are like 500 items.and want to provide Min/Max Quantity for every item in item coverage group.

So,it will take a lot of time to enter manually.

I am completely new to Import/Export.

i have seen basic.

Please tell me how can i import Min/Max for items.

Is there any default entity or should i create new

if new please tell me some steps .

Please help me.

Any help would be greatly Appreciated.

Regards.

Have a great day.

*This post is locked for comments

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Min/Max Import through DMF

    Hi Sohib,

    Thankyou so much that you tried for me.

    it was an excel issue. when i copy 000001.then it took as 1

    the excel removed all zeros

    that is the behaviour of excel

    So,we must select all rows an columns on left top and format -> format cells ->Text -> ok

    now i imported one .it is working fine with out code modification.

    If any thing happens i would ping you sohaib.

    Please feel free to answer.

    Regards

    Have a great day

  • Suggested answer
    Faisal Fareed Profile Picture
    Faisal Fareed 10,794 User Group Leader on at
    RE: Min/Max Import through DMF

    Hi AX 2012 R3,

    In response to your private message in inbox and as I suggested you there. I have tested the entity the Sohaib mentioned it did work for me too. Please share more information on the version of AX and the customization in system as I can see objects are modified on USR layer. This will help us to find out the exact solution for you.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,228 Super User 2024 Season 2 on at
    RE: Min/Max Import through DMF

    Hi AX 2012 r3,

    Can you tell the exact version number of AX 2012 which you are using? As your nickname is AX 2012 r3, I assumed you are using this version. Possibly you have an older version and tried to create the entity using a wizard. Sohaib also noticed your objects are in the USR layer.

  • Verified answer
    Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Min/Max Import through DMF

    your class is missing code to generate inventdim.

    this mean when records go into your destination table, they don't have a corresponding record of inventdim and inner join fails to return record. Thus you don't see anything on form.

    replace above code of getReturnFields with following code

    public static container getReturnFields(Name _entity, MethodName _name)
    {
        DataSourceName dataSourceName = queryDataSourceStr(DMFReqItemTableTargetEntity, ReqItemTable);
        Container con = [dataSourceName];
        Name fieldstrToTargetXML(FieldName _fieldName)
        {
            return DMFTargetXML::findEntityTargetField(_entity ,dataSourceName, _fieldName).XMLField;
        }
    
        switch (_name)
        {
            case methodStr(DMFReqItemTableEntityClass, GenerateInventDim) :
                con += [fieldstrToTargetXML(fieldStr(ReqItemTable, CovInventDimId))];
                break;
            default :
                con = conNull();
        }
    
        return con;
    }

    and then add a new method in your class  as following

    [DMFTargetTransformationAttribute(true),DMFTargetTransformationDescAttribute("@DMF349"),
    DMFTargetTransformationSequenceAttribute(5)
    ,DMFTargetTransFieldListAttribute([fieldStr(DMFReqItemTableEntity,configId),fieldStr(DMFReqItemTableEntity,InventSizeId),fieldStr(DMFReqItemTableEntity,InventSiteId),fieldStr(DMFReqItemTableEntity,inventSerialId),fieldStr(DMFReqItemTableEntity,InventLocationId),fieldStr(DMFReqItemTableEntity,InventColorId),fieldStr(DMFReqItemTableEntity,inventBatchId),fieldStr(DMFReqItemTableEntity,InventStyleId),fieldStr(DMFReqItemTableEntity,wMSLocationId),fieldStr(DMFReqItemTableEntity,wMSPalletId)])
    ]
    public Container GenerateInventDim(boolean _stagingToTarget = true)
    {
        container   res;
    
        if (_stagingToTarget)
        {
            inventDim = DMFDimensionHelper::generateInventDimID(entity);
            res = [inventDim.inventDimId];
        }
    
        else
        {
            inventDim = inventDim::find(target.CovInventDimId);
            res = [
                inventDim.configId,
                inventDim.InventSizeId,
                inventDim.InventSiteId,
                inventDim.inventSerialId,
                inventDim.InventLocationId,
                inventDim.InventColorId,
                inventDim.inventBatchId,
                inventDim.InventStyleId,
                inventDim.wMSLocationId,
                inventDim.wMSPalletId];
        }
    
        return res;
    }

    Finally rebuild your entity and regenerate mapping

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Min/Max Import through DMF

    Hi sohaib,

    Please find the below screenshots

    3301.DIXF2.png

    but in form

    3301.DIXF2.png

    Class is

    1643.Dixf3.png

    I did not modify any method in this class.

    What should i modify.

    Please correct me.

    Regards.

    Have a great day Sohaib.

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Min/Max Import through DMF

    screenshot shows your objects in USR layer which means it is customized entity as per your environment and it is very much possible you are missing the code in entity class or you might have forget to add field under DMF field group of table. you can take working entity of SYS layer from any 2012R3CU9 or higher version of ax and that should be working perfectly.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Min/Max Import through DMF

    Hi sohaib,

    I am using ax2012 r3.

    I will try the other time.

    if it works. fine

    i will provide the answer with screen shots.

    Regards.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Min/Max Import through DMF

    Hi sohaib,

    I have checked in table just now.it is showing same.

    Please find the below screenshots

    Dixf3.png

    Dixf3.png

    Regards.

    Will try another time.

    Thank you

  • Sohaib Cheema Profile Picture
    Sohaib Cheema 46,610 User Group Leader on at
    RE: Min/Max Import through DMF

    I just tried it, now on my demo system and it worked straight away. no issues at all. would you like to delete and rebuild your entity in list of entities? it may not ab an issue with your mapping. also what version of ax you are using?

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: Min/Max Import through DMF

    Good Morning Sohaib,

    Thanks for your reply.

    Yes i have created same way.

    But it is already saying record is inserted.

    but when i go to that form

    the quantity like max and min are not correct.

    but in table they are correct.

    can you please tell me why it is like that.

    Regards.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans