CRM 2016 set default “Look for” entity and “Look in” view when using “Look Up Record” dialog

Dynamics CRM 2013 to 2015 we are able to set the default “Look for” entity and “Look in” view of the “Look Up Record” dialog using the following:

document.getElementById(“customerid”).setAttribute(“defaulttype”, “2”);
Xrm.Page.getControl(“customerid”).setDefaultView(“a2d479c5-53e3-4c69-addd-802327e67a0d”);

This no longer works in CRM 2016 and I believe the source of the problem is explained here. Basically the new form rendering engine loads each script in separate iframes instead of the same frame as the form. This makes it so the document.getElementById() method can no longer find the element with the given name.

Finally I find out solution and it work for me.

I want to set “regarding” field in phone call to “contact” entity only.

var control = Xrm.Page.getControl(“regardingobjectid”);
control.getAttribute().setLookupTypes([“contact”]);

It works perfectly for me. Please try and post your comments if you face any issue.

SQL Parser by Microsoft SQL Server for C#

Please check below article,

https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.sqlparser.parser.parseresult(v=sql.120).aspx

Sample code.

using Microsoft.SqlServer.Management.SqlParser.Parser;

ParseResult pr = Parser.Parse(@”Select * from Config where ID in (Select top 10 ID from Config order by ID desc)”);

You will find Assembly “Microsoft.SqlServer.Management.SqlParser.dll” in GAC (Assembly Folder)

Dynamics CRM 2013 – Overview

Since long i am looking to start learning Microsoft Dynamics CRM But problem is very few resource available.

So I decided to start collecting all information and will post in a sequence to get started to expert in CRM extending.

My first post here from FMT consultant Henry Lin – CRM Developer at  FMT.

In this article he explain how you start CRM online development and extending it.

http://www.fmtconsultants.com/2013/11/step-by-step-guide-to-portal-development-for-microsoft-dynamics-crm/

Feel free to ask question on CRM.

Back to WordPress

Hello friends,

I started thus blog to gather information and share my knowledge which i research.

After finish 1st year i stop posting but i am getting good comments from you guys which finally inspire me to spend some time daily to update this blog.

Hope you enjoy my work and give me valuable feedback and suggestions.

Love you all….

Asif Huddani

Integrating Microsoft Dynamics AX 2012 with SAP for Expense Management

Learn how Microsoft standardized on one solution, globally, for employee expense management. In this webcast, we describe how integrating Microsoft Dynamics AX 2012 with SAP for expense management achieved greater policy enforcement, improved flexibility to react to changing business conditions, and reduced long term maintenance costs while enabling future business capabilities.

Click to view the recording here

OR

https://msevents.microsoft.com/CUI/EventDetail.aspx?culture=en-US&EventID=1032499676

 

%d bloggers like this: