Сообщение от
vasya-serega
Доброго времени суток.
У меня есть кастомный LookUp, в котором пользователь может выбрать значения 2 разных сущностей
lookuptypeIcons = '/_imgs/ico_16_2.gif:/_imgs/ico_16_8.gif';
lookuptypenames = 'contact:2:Contact,systemuser:8:User';
lookuptypes = '2,8';
document.getElementById("requiredattendees").setAttribute("lookuptypes", lookuptypes);
document.getElementById("requiredattendees").setAttribute("lookuptypenames", lookuptypenames);
document.getElementById("requiredattendees").setAttribute("lookuptypeIcons", lookuptypeIcons);
Xrm.Page.getControl("requiredattendees").addCustomView(viewId, 'contact', viewDisplayName, fetchXml, layoutXml, false);
Xrm.Page.getControl("requiredattendees").addCustomView(viewId, 'systemuser', viewDisplayName, fetchXml1, layoutXml1, false);
И есть 2 кнопки на форме, которые должны вызывать этот LookUp по-разному. Хотелось бы, после нажатия одной кнопки значение по умолчанию Look for было Contact, а второй - User. Подскажите, как это можно сделать?