web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Community Member Profile Picture
    on at

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

  • Suggested answer
    Fedir Kryvyi Profile Picture
    1,026 on at

    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?

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 > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans