Announcements
Hi, I followed the same instruction found on this link:
Im using field named "customerid" instead. However, when accessing getEntityTypes(), it gives me an error.
The only available functions are below:
Is there any wrong on how I write the code or maybe due to version of the CRM?
Thank you in advance
Jerome,
If getEntityTypes is not there - you can't make it appear, unfortunately.
If my reply (or replies) answers your question take a minute and verify the answer. You can do it by clicking "Yes" at the top of the reply (or replies) under the label "Does this answer your question?"
Hi Andrew,
The solution you provided seems good since it could not display Contact records. I came up with the solution with some modifications:
function defaultcustomer(){
Xrm.Page.getControl("customerid").addPreSearch(addFilter);
}
function addFilter()
{
var customerAccountFilter = "<filter type='and'><condition attribute='contactid' operator='null' /></filter>";
Xrm.Page.getControl("customerid").addCustomFilter(customerAccountFilter, "contact");
}
If there is a way that it can hide the Contact from the dropdown list, it would be much better.
Thanks,
Jerome
Hello Jerome,
That's weird because it seems this function was added in 8.1 version - dreamingincrm.com/.../
If it's not available I would recommend to take a look on the alternative way to restrict the values available to a lookup control - powerobjects.com/.../
Hi Andrew,
This is what is indicated on the CRM:
Microsoft Dynamics 365
Versione 1612 (8.2.4.6) (database 8.2.4.6) locale
Thanks,
Jerome
Hello,
What version are you on?
André Arnaud de Cal...
294,206
Super User 2025 Season 1
Martin Dráb
232,968
Most Valuable Professional
nmaenpaa
101,158
Moderator