Default Filter for Lookup Dialog in Dynamics CRM 2011

I am attempting to customize a lookup dialog to default to a specific entity type.

While working on the Connection form, I am checking the entity type of record1id and attempting to use that information to set the defaulttype attribute on record2id.

My current approach involves:

    document.getElementById("record2id").setAttribute("lookuptypenames","incident:112:Case");
    document.getElementById("record2id").setAttribute("lookuptypes","112");
    document.getElementById("record2id").setAttribute("defaulttype","112");  // Case
    Xrm.Page.getControl("record2id").setDefaultView("{9AC51863-58C7-49A0-ADCC-AFD9A4C3EE59}");    

The code above successfully limits the lookup dialog type selection to only incident (although not exactly what I intended), but I am having trouble changing the default view to something else as desired.

I am currently stuck and open to new ideas or suggestions on how to achieve this customization effectively.

Thank you

Answer №1

Filtering lookups on the Connection form is not supported, but you can learn more about setting a custom view as default here.

Answer №2

While I understand that this post is from the past, it still provided me with valuable information that addressed my question without the need for me to ask.

You might find some useful insights in this tech blog post that offers a different perspective on the topic.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Odd behavior observed while running npm scripts in the npm terminal

Included in my package.json file are the following dependencies: "devDependencies": { "chromedriver": "^2.37.0", "geckodriver": "^1.11.0", "nightwatch": "^0.9.20", "selenium-server": "^3.11.0" }, "scripts": { "e2e": "nightwatch -c test ...

React with TypeScript: The struggle of getting LocalStorage to work

Currently, I am dealing with persistence in a todo application developed using React and TypeScript. To achieve the desired persistence, I have implemented localStorage. Allow me to share some code snippets: const [todos, setTodos] = useState<todoMod ...

Using jQuery to determine if a radio button has been selected on a price calculator

Having a JavaScript code that calculates the total price based on radio/checkbox selection. JQUERY var price = 0; $('.price-input').click(function () { if ($(this).is(":checked")) { price += parseInt($(this).attr("data-price"), 10); ...

Set tab navigation widget with a fixed height

I am struggling with setting a fixed height for my tabs widget so that when I add more content, it will display a scrollbar instead of expanding endlessly. I have checked the CSS and JS files but cannot figure it out. It is important for me to contain this ...

What is the best way to retrieve the biggest image (based on dimensions) from a website using the URL?

As an example, when I enter: http://www.google.com/ The result would be: http://www.google.com/images/logos/ps_logo2.png This would be accomplished using javascript/jquery. All the websites involved are external. Appreciate your help! ...

clicking on a DIV element

I am trying to trigger a JavaScript function by clicking on a DIV element, but for some reason it is not working as expected. I have gone through various examples provided by the helpful people here, but still can't figure out what I'm doing wron ...

Troubleshooting a labeling problem in a donut chart with Chart.js

$(document).ready(function(){ function call() { $.ajax({ url: "chartjs/tempdata.php", method:"GET", cache: false, success: function(data) { console.log(data); var difference=[]; var percentage=[]; var finaldata=[]; for(var i in data) { //time.push( ...

Execute Function after Gridview Sorting

While working on a gridview within an update panel, I encountered a scenario where the gridview successfully resorts itself upon clicking on the column header. However, post-sorting, I wish to execute a JavaScript function named MyScript. Any suggestions ...

React native and redux: Updating state with setState is not possible during an ongoing state transition

Currently in the process of developing an app utilizing React Native and redux, alongside Express js for handling Ajax requests. Encountering an issue where the data from my Ajax request fails to load, accompanied by the following warning: Warning: set ...

Models of Earth and the Sun are failing to render

After numerous attempts at debugging, I am stuck on an issue with my Earth and Sun models not rendering correctly. They are displaying as a dull filled color despite having a texture applied to the sphere. If you could take a look at lines 104 - 141 where ...

Adjusting the dimensions of the cropper for optimal image cropping

I am currently working on integrating an image cropper component into my project, using the react-cropper package. However, I am facing a challenge in defining a fixed width and height for the cropper box such as "width:200px; height:300px;" impo ...

Ajax successful event fails to trigger

Having Trouble Implementing Okta Authentication with WebForms The login functionality is working, but the redirect part is not functioning correctly I have attempted to use void and return a JSON object/string, but it does not seem to work If I remove th ...

How to detect the Back Button or Forward Button events in a single-page application

Currently, I am developing a single-page application that utilizes ASP.NET MVC, Backbone.js, and JQuery. My task involves capturing the browser's back and forward button events for breadcrumb implementation. I previously attempted to use the hashchan ...

When invoking `render(@partial)` in the controller, an error is thrown: ActionController::Unknown

When trying to render a partial using ajax, I encountered an error that reads as follows: ActionController::UnknownFormat in ThingsController#upvoterandom ActionController::UnknownFormat This error is baffling because I previously achieved a similar task ...

Error: Headers cannot be set once they have already been sent

My app.js file has the following code snippet: app.use(function(req, res, next){ if(!req.user){ return res.redirect('/login_'); } next(); }) Everything seems correct so far. In my route/index.js file, I have the following code: rout ...

Setting the current time in an Animation using ThreeJS

I'm utilizing skinning and skeletal animation within ThreeJS. My goal is to navigate through an animation by moving backward and forward, as well as jumping to specific locations within the sequence instead of the usual looping behavior. The animatio ...

Ways to ensure that ng-click is triggered exclusively on the click event

I am a beginner in Angular and attempting to toggle a class on click only for the current link. However, when I click, it is affecting all links instead of just the current one. I would like it to work only on the current element, similar to how we use "(t ...

Tips for incorporating a Survey Monkey website embed into an Angular application

I have a Survey Monkey account with multiple surveys. I am trying to embed a survey from this website into my Angular website, which already has Bootstrap and jQuery added. I attempted to directly add the script in an HTML component, but it did not work. ...

Tips for utilizing jQuery buttons to submit forms in PHP

I'm struggling to submit the form using PHP from a button in jQuery. I've tried adding an ID for the button, but I can't seem to submit the values. Since I'm new to jQuery, this task is proving to be a bit challenging. Can anyone provid ...

How to avoid property sharing in Angular recursive components

I am currently working on a recursive component that generates a tree structure with collapsible functionality. However, I am facing an issue where the state variable active is being shared among child components. Is there a way to prevent this from happen ...