Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Vendor Creation in Ax7

$
0
0

Hi Friends,

            I need to create vendor in Odata Integration using c# code,

         Vendor vend = new Vendor();

 DataServiceCollection<Vendor> vendorcollection = new DataServiceCollection<Vendor>(context);
vendorcollection.Add(vend);
vend.VendorAccountNumber = "THMF-00008";
vend.VendorName = "Rio";
vend.VendorPartyType = "Organisation";
vend.VendorGroupId = "30";
vend.CurrencyCode = "THB";
vend.DataAreaId = "THMF";
vend.AddressCountryRegionId = "AFG";
context.SaveChanges(SaveChangesOptions.PostOnlySetProperties | SaveChangesOptions.BatchWithSingleChangeset); // Batch with Single Changeset ensure the saved changed runs in all-or-nothing mode.

But I am getting the error like this,

Please suggest me an solution.

Thanks & regards,

padmapriya varatharajan


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>