Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / AX 7 Odata -Released d...
Finance forum
Suggested answer

AX 7 Odata -Released distinct Product - Warning: Field 'Language' must be filled in.; Warning: You must enter a translation for the product to save the record

Posted on by 960

Hi All ,

Using Odata , I am trying to create Distinct Product ,and using the below code for same :



            Microsoft.Dynamics.DataEntities.DistinctProduct product = new DistinctProduct();
            DataServiceCollection<DistinctProduct> prod = new DataServiceCollection<DistinctProduct>(context);
            prod.Add(product);
            product.ProductNumber = Prod;
            product.ProductName = Prod;
            product.StorageDimensionGroupName = "Site";
            product.TrackingDimensionGroupName = "None";

            product.ProductType = EcoResProductType.Item;
           
            Microsoft.Dynamics.DataEntities.ReleasedDistinctProduct dpr = new ReleasedDistinctProduct();
            DataServiceCollection<ReleasedDistinctProduct> releasedProd = new DataServiceCollection<ReleasedDistinctProduct>(context);
            releasedProd.Add(dpr);
            dpr.ProductNumber = Prod;
            dpr.ItemNumber = Prod;
            dpr.DataAreaId = "usmf";
            dpr.ItemModelGroupId = "FIFO";
            dpr.ProductGroupId = "Audio";
            dpr.ProductionType =  PmfProductType.None;
           

            context.SaveChanges(SaveChangesOptions.PostOnlySetProperties);
           
        

I am getting the error :

message":"An error has occurred.","innererror":{
      "message":"Write failed for table row of type 'EcoResReleasedDistinctProductEntity'. Infolog: Warning: Field 'Language' must be filled in.; Warning: You must enter a translation for the product to save the record.; Warning: validateWrite failed on data source 'EcoResProductTranslation (EcoResProductTranslation)'.","type":"Microsoft.Dynamics.Platform.Integration.Services.OData.AxODataWriteException","stacktrace":"

Can someone please help me,what I am missing here.

Thanks,

Gaurav PAndey

  • Suggested answer
    Fedir Kryvyi Profile Picture
    Fedir Kryvyi 1,026 on at
    RE: AX 7 Odata -Released distinct Product - Warning: Field 'Language' must be filled in.; Warning: You must enter a translation for the product to save the record

    Well, obviously, you have to also provide some value for "Language" field. Have you checked entity itsel? Are there any changes or maybe Data Entity extensions for this entity?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: AX 7 Odata -Released distinct Product - Warning: Field 'Language' must be filled in.; Warning: You must enter a translation for the product to save the record

    I have a same issue. Did you resolve this issue?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans