Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / AX 7 Odata -Released d...
Finance forum

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

(0) ShareShare
ReportReport
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
    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
    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?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,238 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans