Hi Naeem Khan ,
One way to do it is
function showContactLookupDialog() {
try {
var lookupParameters = {};
//specify the list of entity types to be displayed in lookup dialog
lookupParameters.entityTypes = [“contact”];
//Sepecify the default entityType need to be displayed
lookupParameters.defaultEntityType = “contact”;
//Default view need to be displayed
lookupParameters.defaultViewId = “{00000000-0000-0000-00AA-000010001004}”; // you can put here the view id you want to display you can get viewid from advanced Find
//allow multiple selection or not
lookupParameters.allowMultiSelect = false;
//list multiple views available on lookup dialog
// lookupParameters.viewIds = [“{0D5D377B-5E7C-47B5-BAB1-A5CB8B4AC105}”, “{A2D479C5-53E3-4C69-ADDD-802327E67A0D}”];
Xrm.Utility.lookupObjects(lookupParameters).then(DisplaySelectedContact, null);
} catch (e) {
Xrm.Utility.alertDialog(e.message);
}
}
function DisplaySelectedContact(selectedContact) {
try {
alert("Success");
} catch (e) {
Xrm.Utility.alertDialog(e.message);
}
- Open ribbon workbench , select the solution which you have created .
- Now go to the area Form , Subgrid , Home where you want to add your action , find the button.
- If its existing button then right click on button --Customize Button if its new button then also you can find this options.

- Now again right click on button just select - Customize Command. You can see the commands in command area highlighted in the above screenshot.
- Select the command and mapped web resource and your function.

- Don't forget to map the command to your button command properties. When you select the button in the Ribbon Workbench you can see command .

Hope this helps.
Thanks
Ajyendra