I am currently creating my MetaFields for both MetaDataPlus and BusinessFoundation programatically.
When using MDP everything works as expected and the added fiels show up om the MDP-class when viewing i.e lineitems.
But when adding metafields to a BusinessFoundation object it only gets added to the specified class and I manually have to add the fields to the Form-views (Edit Form, View Form).
Does anyone have any suggestions on how to programatically add metafields to the forms for a specific metaclass?
Same issue as I'm having in this post: Make custom meta fields display in Commerce Manager contact management
Does anybody have an answer for this?
I'm guessing there is no solution to this besides handling this manually..
That's my conclusion as well, but it would be nice with a confirmation from EPiServer. This seems like a fairly straight forward thing to accomplish, so I don't understand why it isn't possible.
After adding the metafields to the metaclass you can add the field to the desired form by code as well.
The function to use is:FormController.AddMetaPrimitive(string metaClassName, string formName, string fieldName)(Mediachase.BusinessFoundation.MetaForm.FormController)
The Form names are:
Edit Form -> [MC_BaseForm]Short Info Form -> [MC_ShortViewForm]View Form -> [MC_GeneralViewForm]
Thank you Mark!