Shaikh,
Following are the functions to add/remove custom link/button into the info window. Include these functions into the search widget's widget.js. and define onClick handler (_onCustomAction).
_addAction: function(){
var link = domConstruct.create("a",{
"class": " action my-action", //give it a unique class
"id": "customAction",
"innerHTML": "My Action", //text that appears in the popup for the link
"href": "javascript: void(0);"
}, query(".actionList", this.map.infoWindow.domNode)[0]);
//when the link is clicked register a function that will run
on(link, "click", this._onCustomAction);
}
_removeAction: function() {
//to remove either store "link" var into a global or get it by class using dojo/query
query(".my-action", this.map.infoWindow.domNode).forEach(function(elem){
elem.destroy();
})
}
Call this _addAction method in "_onSearchResults" method inside Search widgets's widget.js.
Hopefully this should do what you want.
Thanks,
Girish