Hey guys,
I am currently working on a requirement regarding the Business Process Flow in the new Unified Interface.
I need to add a custom view I create with JavaScript to a lookup field in the BPF.
So in JS, I create a custom FetchXML for the filtering and also create custom FetchXML for the layout.
Once I got both get the control via the formContext and add the custom view.
So far so good: The view is added to the list of views when I click on "Change View" on the lookup in the BPF.
But unfortunately it is not applied by default, so a user wouldn't need to click on "Change View".
I have tried to use the "setDefaultView" function right after I add the custom view but unfortunately that does not work.
It worked a couple of weeks ago actually only by using the "addCustomView" function but now it does not set it to default anymore.
Does anyone experience the same issue or came across something familiar?
Here is my code:
var consultantFetch = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>"+
"<entity name='systemuser'>"+
"<attribute name='fullname' />"+
"<attribute name='systemuserid' />"+
"<order attribute='fullname' descending='false' />"+
"<link-entity name='teammembership' from='systemuserid' to='systemuserid' visible='false' intersect='true'>"+
"<link-entity name='team' from='teamid' to='teamid' alias='ad'>"+
"<filter type='and'>"+
"<condition attribute='teamid' operator='eq' uiname='Consulting' uitype='team' value='{269FDEA7-EAF0-E911-A812-000D3AB958AA}' />"+
"</filter>"+
"</link-entity>"+
"</link-entity>"+
"</entity>"+
"</fetch>";
"<row name='result' id='systemuserid'>"+
"<cell name='fullname' width='300' />"+
"</row>"+
"</grid>";
formContext.getControl("header_process_new_consultant").setDefaultView("{00000000-0000-0000-0000-000000000002}");