Hello,
I'm using EF and have class Role that has a property Forwarder:
C#public class Role : IXafEntityObject, IObjectSpaceLink, INotifyPropertyChanged, IHasAuditInfo
{
...
[StringLength(10)]
[Column("forwarder_code")]
public String ForwarderCode { get; set; }
[ForeignKey("ForwarderCode")]
public virtual Forwarder Forwarder { get; set; }
...
}
When I click on the Forwarder field in the Web UI, the lookup view (args.View.ID: Forwarder_LookupListView) pops up as expected but the columns in it are different from what is defined in the model. It seems that the model for the lookup view is completly ignored.
If I apply VisibleInLookupListView(false) attribute to Forwarder's properties, they disappear from the lookup.
When I add another column to lookuplistview usin the model editor, it doesn't show up in the runtime.
What should I do to get the lookupview from model to show up in the runtime?
Thank You
Hello Radowan.
Please verify that the Forwarder_LookupListView view is actually used for the lookup editor. A different list view can be specified in the IModelMemberViewItem.View property.
If you are modifying the lookup list view model in the platform-agnostic module, check that it is not further customized in the platform-specific module or the application model. Also, see that the IModelListView.FreezeColumnIndices property is not set to True in higher model layers as this will suppress changes made in lower model layers.
If this doesn't help, provide us with a sample project demonstrating the issue,
Hello Michael,
Thank you for your comments. I verified in the runtime debug window that Forwarder_LookupListView is used.
I have prepared sample project. I also included a word document with steps to reproduce.
While I was preparing it, I discovered that the behavior of Model Editor is strange:
When my class is decorated with [DefaultProperty("CompanyCode")] attribute, it generates different lookup view and customizations of this new view are ignored. Please see attached file for more details.
Thanks for the project. I see the issue. We need additional time to research it. We will get back once we have any result.