I am trying to create a vendor from Custom Code.
var svc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.VendorSvcContract>(Db);
var VTcreate = new Erp.Tablesets.VendorTableset();
svc.GetNewVendor(ref VTcreate);
var vcreate = VTcreate.Vendor.FirstOrDefault();
vcreate.VendorID = “31071”;
vcreate.Name = “Vendor Name”;
vcreate.ZIP = “12345”;
vcreate.City = “Oslo”;
vcreate.Address1 = “Address Line”;
vcreate.CurrencyCode = “NOK”;
vcreate.TaxPayerID = “TaxID”;
vcreate.TermsCode = “N045”;
vcreate.Inactive = false;
vcreate.Approved = false;
vcreate.CountryNum = 163;
vcreate.LegalName = “Legal Vendor”;
vcreate.RowMod = “A”;
svc.Update(ref VTcreate);
When I try to create it manually there are no errors. But When I try with the code it gives me Error
.
This code works for other companies in Which CSF is not installed.
I Suspect it has something to do with the Extension tables for Vendor.
Any Clue will be helful.
Thanks