How to create Announcements in Dynamics CRM?

Announcements in Dynamics CRM are used to broadcast the important news to all the system users in an Organization.

Continue reading

Advertisements

How to get Dynamics CRM Version number using CRM SDK and C# Console Application?

Use the below code to get the Dynamics CRM Version number using CRM SDK and Console Application C#.

RetrieveVersionRequest request = new RetrieveVersionRequest();

RetrieveVersionResponse response = (RetrieveVersionResponse)organizationService.Execute(request);
Version version = new Version(response.Version);
and include the above code to check the result.
Final code looks like the below.
Retrieve Version Request and Response
Output:
Retrieve Version Request and Response - Output
Note:
This feature was released in Microsoft Dynamics CRM 2015 Online Update 1
(v7.1) and will work perfectly in the below CRM versions
Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016,
Dynamics CRM Online

How to get users details under Teams using SQL query in CRM?

Run the below query to get all the users details under all the Teams available in CRMS.

Select
Team.name [Team Name],
SysUser.Fullname [User Name],
SysUser.mobilephone [Mobile Phone],
SysUser.internalemailaddress [Primary Email]
from
dbo.FilteredSystemUser SysUser
inner Join
dbo.FilteredTeamMembership TeamMem
on SysUser.Systemuserid = TeamMem.Systemuserid
Inner join dbo.FilteredTeam Team
on Team.TeamID = TeamMem.TeamID
–where Team.name in –Uncomment this where condition to specify the required Team names
–(
–Sales Person
–)
order by Team.NAME

Plug-in assembly does not contain the required types or assembly content cannot be updated.

Got the below error, while updating the Merged plugin dll in SIT environment.

Error Message - Detail

Started comparing the differences between Dev and SIT environments by navigating to

Microsoft Dynamics CRM -> Settings -> Customization -> Customize the System -> Plug-in Assemblies.

Clicked on the required Plug-in Assembly and started comparing the number of plug-in class files in it.

Plugin Assemblies

Found that, in the SIT environment have extra plug-in class files, which were imported in the beginning of the project and which were not present now in the updated Merged Plug-in Assembly Dll (Removed as per client requirement from the Dev code).

Finally, deleted those files manually in the SIT environment by connecting to the Plugin Registration tool and unregistered them.

Updated the required plugin assembly in SIT. It worked and issue resolved :):):)

Lock or Unlock Business process flow fields using JavaScript in CRM

Use the below syntax to lock or unlock the business process flow fields in a crm record using javascript,

Lock:

Xrm.Page.getControl(“header_process_FieldSchemaName”).setDisabled(true);

UnLock:

Xrm.Page.getControl(“header_process_FieldSchemaName”).setDisabled(false);

How to get list of all Entities Display Name, Logical Name and Other info using SQL Query in MSCRM?

Use the below query to get all the list of Entities Display Name, Logical Name and Object Type Code.

SELECT 
DISPLAYNAME.LABEL 'Display Name', 
EV.NAME 'Logical Name',
ObjectTypeCode 'Object Type Code'
FROM 
ENTITYVIEW EV INNER JOIN 
LOCALIZEDLABELLOGICALVIEW DISPLAYNAME
ON (EV.ENTITYID = DISPLAYNAME.OBJECTID) AND (DISPLAYNAME.OBJECTCOLUMNNAME = 'LOCALIZEDNAME')
WHERE 
LANGUAGEID = 1033 -- Add this if you want to filter records using language Id. For Example : LANGUAGEID 1033 is English
--AND ISCUSTOMENTITY = 1 -- Remove this if you want to show the system entities as well 
--AND ISACTIVITY = 0 -- Add this if you want to filter out the activity entity
--AND EN.NAME NOT LIKE '%MSDYN%' -- Add this if you want to remove like post album, filter, etc
ORDER BY 1

Output:

How to get list of all Entities Display Name, Logical Name and Other info using SQL Query in MSCRM

Inspired from Miss Dynamics CRM blog