Monday, February 24, 2014

MS CRM 2013 Quick find with always wildcard charcter

This is unsupported way of CRM customization. when any new rollup installed these changes may be removed.

Steps:
1.       Go to C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\_common\scripts
2.       Find stage.js script file.
3.       Make a copy of this file.
4.       Open Stage.js script file.
5.       Find function function quickFind(oGrid)
In this function find

sFindCriteria = Trim(findCriteria.value.replace(/[\*]+/, "*"));findCriteria.value = sFindCriteria;

6.       Replace

sFindCriteria = Trim(findCriteria.value.replace(/[\*]+/, "*")); 

with
If wants wild chard character always comes first when entered any key word for search (*abc)

sFindCriteria=Trim(findCriteria.value.replace(/[*]+/,""));if (sFindCriteria != "" && sFindCriteria.substr(0, 1) != "") sFindCriteria = "*" + sFindCriteria;


If wants wild chard character always at end (abc*) then

sFindCriteria=Trim(findCriteria.value.replace(/[*]+/,""));if (sFindCriteria != "" && sFindCriteria.substr(0, 1) != "") sFindCriteria =  sFindCriteria+"*";

if wants wildchard character in both places (*abc*)

sFindCriteria=Trim(findCriteria.value.replace(/[*]+/,""));if (sFindCriteria != "" && sFindCriteria.substr(0, 1) != "") sFindCriteria =  "*"+sFindCriteria+"*";

7.       Save the file.
8.       Clear your browser cache
9.       Try now.. 





1 comment:

  1. hi
    thanks for your useful post.
    Do you know for global search and lookup search in dynamics 365 how to insert * automate?

    ReplyDelete