This is something we wanted since long time in Adxstudio Portal and now in CRM Portal . the term ‘autocomplete’ might be a bit misleading since the field is not automatically completed but instead you can select the suggested item from the list.
Till now, neither in Adxstudio nor in CRM Portal has this feature which sometime leaves a bad impression because some users have commented that the user experience is not as intuitive as they would like.
User would expect to be able to type into the control to look up data, or at least be able to interact with the text element of the look-up control.
As per the Adxstudio Community, they would like to add this feature in future release, though they don\’t have a timeline for when they might do so.
This article has step by step guide to achieve autocomplete feature on Portal lookup controls :
Here we go…
You do not need to do anything, I have made set everything for you 👍
You just need to do some simple configuration to make it work.
Step 1: Download the JavaScript File from here
Step 2 : Create a Web File record (under Portal > Web Files) with below mentioned details.
Step 3 : Attach JavaScript file in \’Notes\’ that you have downloaded in Step 1.
Step 4 : You are all set with the require configuration. Now to apply Lookup Search or Lookup Autocomplete feature you just need to go to Custom JavaScript section of either Webpage or Entity Form.
$(document).ready(function() {
//Parameter1 ——> Lookup Field\’s Entity Name
//Parameter2 ——> PrimaryField name of Lookup Field\’s Entity Name
//Parameter3 ——> OData Feeds Entity Set Name (Entity List that you have been created for OData Feeds)
//Parameter4 ——> \’Field Name\’ that you want to search in Lookup Field.
//Parameter5 ——> \’Lookup Field Name Id\’ on which you are enabling Search feature.()
//Parameter6 ——> \’Lookup Field Id\’ on which you are enabling Search feature. ()
//Parameter7 ——> \’Lookup Field Entity Name Id\’ on which you are enabling Search feature. ()
Note : Those who are confused what does Parameter 5,6,7 actually means can look the below snapshot for more information. Every Lookup on Portal comes with three IDs highlighted with yellow.
//Parameter8 ——> \’Guid\’ of Portal Logged In User.
//Parameter9 ——> \’Field Name\’ of Lookup Field\’s Entity in which you are storing Contact Name.
var loggedinUser = \'{{ user.Id }}\’;
var loggedinuserAccount = \'{{ user.parentcustomerid }}\’;
$.getScript(\’~/content/LookupSearchContol\’, function () {
// If you don\’t want to incorporate logged In User security on lookup autocomplete, just pass the last two parameters value as null
ApplyLookupSearch(\”contact\”, \”contactid\”, \”contacts\”, \”fullname\”, \”looupfield_name\”, \”lookupfield\”, \”lookupfield_entityname\”,null,null);
// If you want to incorporate logged In User security on lookup autocomplete, just pass the last two parameters value as below
or
// Lookup Autocomplete items will be Filtered based on Logged In User
ApplyLookupSearch(\”incident\”, \”incidentid\”, \”cases\”, \”ticketnumber\”, \”looupfield_name\”, \”looupfield\”, \”lookupfield_entityname\”,loggedinUser,\”primarycontactid\”);
// If you want to incorporate logged In User Account security on lookup autocomplete, just pass the last two parameters value as below
or
// Lookup Autocomplete items will be Filtered based on Logged In User Account
ApplyLookupSearch(\”incident\”, \”incidentid\”, \”cases\”, \”ticketnumber\”, \”looupfield_name\”, \”looupfield\”, \”lookupfield_entityname\”,loggedinuserAccount,\”customerid\”);
});
});
Step 5 : Once you are done with all the above mentioned configuration for \’Lookup Autocomplete\’ feature, You just need to log Into your Portal and go to that Lookup in which you have enabled searching option.
Type the text and press \’Tab\’ in the keyboard, you will find list of all related items/records in the list matched to your types text same like CRM.
For Example :
Suppose you have \’State\’ or \’City\’ Lookup field on Portal Entity Form and you want to incorporate Lookup Autocomplete then you have to call function as below :
ApplyLookupSearch(\”stateentityname\”, \”stateentityprimaryfieldname\”, \”states\”, \”name\”, \”looupfield_name\”, \”looupfield\”, \”lookupfield_entityname\”,null,null);
I kept last two parameters null, because I don\’t want to apply logged In user security here.
But, suppose if I have \’Case\’ lookup field on Portal Entity Form and you want to incorporate Lookup Autocomplete then you have to call function as below :
ApplyLookupSearch(\”incident\”, \”incidentid\”, \”cases\”, \”ticketnumber\”, \”looupfield_name\”, \”looupfield\”, \”lookupfield_entityname\”,loggedinUser,\”primarycontactid\”);
In this case, it\’s is mandatory to apply logged In user security on lookup autocomplete, as we would like to show only logged In user Cases instead of all User Cases in autocomplete list.
Same if you want to apply security based on Logged In User Account basis then apply Logged In user Account Id and Account Field name (in last two parameters) in which you are storing Account details.
Please feel free to get in touch and share your inputs with me. Happy CRMing…😊
Hi,Instead of tabbing out when they click lookup icon modal pop up should have the data searched with value they typed how can this be done. Could you direct.
LikeLike
HII am getting 404 (Not Found) error. can you help me resolve this
LikeLike
This comment has been removed by the author.
LikeLike
HI, What is href=\”/resources/demos/style.css\” in the js provided
LikeLike
It was changing to autocomplete. But when I select, it did not update the lookup id control and saving the form did not have the value which I select using the autocomplete feature
LikeLike
Hey there! I know this is kind of off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having trouble finding one? Thanks a lot!cash for cars sunshine coastcar wreckers brisbaneCash for Cars Gold Coast
LikeLike
The tutorial is very helpful for a first timer like me, by the way if you could have given a tutorial on creating a free website, it would have been very helpful for newbies like me.Thank youcar wreckers Adelaidecash for cars sunshine coastcash for cars glenelg
LikeLike
Simply want to say your article is as surprising. The clearness in your post is simply great and i could assume you are an expert on this subject. Well with your permission allow me to grab your feed to keep updated with forthcoming post. Thanks a million and please continue the enjoyable work.sell my car gold coastauto wreckers gold coastCar Wrecker Gold Coast
LikeLike
Wow, that was strange. I just wrote a really long comment but after I clicked submit my comment didn't show up. Grrrr… well, I'm not writing all that over again. Anyways, just wanted to say fantastic blog!cash for cars Ipswichcash for cars gold coastSell Cars for Cash
LikeLike
It’s actually a great and also handy section of details. I am just fulfilled that you simply contributed this helpful info along with us.. Be sure to keep us knowledgeable similar to this. Thank you for expressing.cash for cars logancar removal ipswichcash for cars caboolture
LikeLike
Great remarkable issues here. I’m very glad to look your article. Thanks a lot and I am having a look forward to touch you. Will you please drop me a mail?cash for cars logancash for scrap metalcar wreckers brisbane
LikeLike
Thanks, I have recently been looking for info approximately this subject for a long time and yours is the best I've discovered till now. But, what about the conclusion? Are you sure concerning the source?skip bin hire near meskip bin hire brisbane
LikeLike
In case you are in need of cash then car removal is a great way to get fast cash. Selling your car to a professional car removal service like us also has other advantages. cash for cars in Brisbanecash for cars in Sunnybankcash for cars in Gladstone
LikeLike
Great Article! Thanks for sharing this types of article is very helpful for us! If you looking for car removal services than contact any time for Quotes. Our services are: Cash for car Free car removal brisbane Free car removal Toowoomba Cash for cars Gold Coast
LikeLike
Great article! Are you looking for Custom Web Portal Development Services in Australia. If yes, Kindly visit – Keplersoft
LikeLike
This blog is truly useful to convey overhauled instructive undertakings over web which is truly examination. I discovered one fruitful case of this truth through this blog. I will utilize such data now.best cargo
LikeLike
Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.
LikeLike
Special thanks to (hackingsetting50@gmail.com) for exposing my cheating husband. Right with me i got a lot of evidences and proofs that shows that my husband is a fuck boy and as well a cheater ranging from his text messages, call logs, whats-app messages, deleted messages and many more, All thanks to (hackingsetting50@gmail.com), if not for him i will never know what has been going on for a long time. Contact him now and thank me later.
LikeLike