Hi
I was trying to add 2 new fields in OrderAddress.
First I add the new fields in Business Foundation in Address, lets call it "NewField1" and "NewField2", and in code I do this:
OrderAddress customerOrderAddress = new OrderAddress { Name = source.Id.ToString(), FirstName = address.FirstName, LastName = address.LastName, RegionName = address.Region, DaytimePhoneNumber = address.Phone, EveningPhoneNumber = address.MobilePhone, Email = address.Email, PostalCode = address.ZipCode, Line1 = address.Address, Line2 = address.CareOf, State = address.Region }; customerOrderAddress["NewField1"] = address.NewField1; customerOrderAddress["NewField2"] = address.NewField2; return customerOrderAddress;
But when I run the code, I get a null exception in the first NewField1.
Did I forgot something?
Thanks
I figured out...
Just must also need to Initialise the new field in IInitializableModule.
with MetaClass.Load()
Hi
I was trying to add 2 new fields in OrderAddress.
First I add the new fields in Business Foundation in Address, lets call it "NewField1" and "NewField2", and in code I do this:
But when I run the code, I get a null exception in the first NewField1.
Did I forgot something?
Thanks