Reputation: 36563
I have a custom button on a customized form that needs to prompt the user to search for and select a marketing list.
Ideally I'd like to launch the built in Dynamics lookup form, then get the selected result back from the form.
Is there a supported way that I can do use using the Dynamics API? Either JavaScript or server side code on post-back would be an acceptable solution.
Thanks.
Upvotes: 1
Views: 958
Reputation: 14100
If this customized form is within the ISV directory of a CRM 4 deployment, you could hook up the CRM lookup via javascript.
So, a button click event could call:
var returnValue = window.showModalDialog('/_controls/lookup/lookupsingle.aspx?objecttypes=4300&browse=0&ShowNewButton=0&ShowPropButton=0&DefaultType=0', null, 'dialogWidth:600px;status:0');
For lookupsingle, that returnValue will contain the name and id of the selected Marketing List from the lookup.
returnValue.items[0].name;
returnValue.items[0].id;
Upvotes: 2