tag:blogger.com,1999:blog-569492805909821162024-03-05T12:37:43.771-08:00Chandan's CRM BlogChandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.comBlogger80125tag:blogger.com,1999:blog-56949280590982116.post-23545793466372647472015-12-14T23:11:00.002-08:002015-12-14T23:13:46.553-08:00Caching Issue in CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal">
In my recent implementation when I changed the date time of
the server to and old date the customization and user roles stopped reflecting
unless I reset the IIS. <o:p></o:p><br />
<br /></div>
<div class="MsoNormal">
It is because of the caching feature in CRM. IISRESET clears
the server cache and everything works fine.</div>
<div class="MsoNormal">
Upon investigating how the CRM2011 cache is managed - there
is a Notifications table in the MSCRM_CONFIG database that includes entries
that instruct CRM to clear cache items. The Async Server picks these up and
notifies the HTTP Worker processes to drop each cache by Key.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The reason my notifications were not getting through was
that I had set the server time as an year back. This meant that there were
notifications sitting in this table queue that were for an year old. The Async
server seems to use the latest date when it first starts to define a time
window to query for new notifications. I performed an unsupported DELETE from
the MSCRM_CONFIG.dbo.Notification table and all was well again.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Thanks to <a href="http://www.develop1.net/public/post/Why-is-my-Ribbon-Button-Disabled-(or-CRM2011-caching-under-the-covers).aspx">Develop 1 Limited Blog</a> for the Details <o:p></o:p><br />
<br />
<br /></div>
</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com6tag:blogger.com,1999:blog-56949280590982116.post-87283940971923670252013-09-17T04:01:00.000-07:002013-09-17T04:04:37.515-07:00Export/Import user saved views in Microsoft Dynamics CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
Export and Import user saved views in Microsoft Dynamics CRM 2011.<br />
<br />
As we know user can't "move" his saved views from one environment to another. There is a third party product available to do the same.<br />
The application has been created using Silverlight and its available for download for free.<br />
<br />
The application can be downloaded from here:<br />
<a href="http://exportimportuserview.codeplex.com/releases">http://exportimportuserview.codeplex.com/releases</a><br />
<br />
Please go through the below link for the instructions:<br />
<a href="http://dynamicslollipops.blogspot.in/2011/07/export-import-user-saved-views.html">http://dynamicslollipops.blogspot.in/2011/07/export-import-user-saved-views.html</a></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com3tag:blogger.com,1999:blog-56949280590982116.post-36846952420234493932013-09-13T00:35:00.001-07:002013-10-24T00:39:43.246-07:00Get Campaign List for a given Account/Contact in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<u>Get all campaign where the given Account is part of.</u><br />
<u><br /></u>
SELECT CodeName,name FROM FilteredCampaign -- Campaign Deatils<br />
WHERE CampaignId IN (<br />
SELECT CampaignId FROM FilteredCampaignItem -- Marketing list associated with the Campaign<br />
WHERE EntityId IN (<br />
SELECT LM.listid FROM FilteredListMember LM -- account associated with all marketing lists<br />
LEFT JOIN FilteredAccount Account ON Account.AccountId=EntityId<br />
WHERE Account.name='HP'))<br />
<u><br /></u>
<u>Get all launched campaign where the given Contact is part of.</u><br />
<br />
SELECT CodeName,Name FROM FilteredCampaign -- Campaign Deatils<br />
WHERE CampaignId IN (<br />
SELECT CampaignId FROM FilteredCampaignItem -- Marketing list associated with the Campaign<br />
WHERE EntityId IN (<br />
SELECT LM.listid FROM FilteredListMember LM -- contact associated with all marketing lists<br />
LEFT JOIN FilteredContact CONTACT ON CONTACT.ContactId=EntityId<br />
WHERE CONTACT.FirstName='CHANDAN'))<br />
AND statuscodename='Launched' -- Only LAUNCHED CAMPAIGN</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com3tag:blogger.com,1999:blog-56949280590982116.post-9132576679910834792013-08-23T02:53:00.001-07:002013-10-24T00:40:36.554-07:00Orion Beta (MS CRM 2013) On-Premise/Online trial <div dir="ltr" style="text-align: left;" trbidi="on">
<u>Orion Beta On-Premise/Online trial </u><br />
<br />
The CRM 2013 beta was released on July 28th 2-13 but hasn't been made publicly available as of yet.<br />
<br />
You can get the access of the online version. Just register yourself @ <a href="https://connect.microsoft.com/site687/Survey/MandatorySurveys.aspx">https://connect.microsoft.com/site687/Survey/MandatorySurveys.aspx</a></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com4tag:blogger.com,1999:blog-56949280590982116.post-29153489941854411092013-05-22T00:20:00.002-07:002013-10-24T00:40:45.448-07:00Show Members n Target Product of a Campaign in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Very common requirement to show all members of a campaign and the target products of a campaign in Report. Below query returns the same.<br />
<br />
-- Get Members of a Campaign<br />
<br />
SELECT DISTINCT EntityId,<br />
CASE<br />
WHEN LM.entitytype=1 THEN 'ACCOUNT'<br />
WHEN LM.entitytype=2 THEN 'CONTACT'<br />
WHEN LM.entitytype=3 THEN 'Lead' END AS 'CUSTOMER TYPE',<br />
<br />
CASE<br />
WHEN LM.entitytype=1 THEN ACCOUNT.Name<br />
WHEN LM.entitytype=2 THEN CONTACT.FullName<br />
WHEN LM.entitytype=3 THEN Lead.FullName END AS 'CUSTOMER NAME'<br />
<br />
FROM FilteredListMember LM<br />
LEFT JOIN Account ON ACCOUNT.AccountId=EntityId<br />
LEFT JOIN CONTACT ON CONTACT.ContactId=EntityId<br />
LEFT JOIN Lead ON Lead.LeadId=EntityId<br />
WHERE ListId IN<br />
(Select entityid From FilteredCampaignItem where campaignid = 'B5FCD75A-A1AD-E211-854C-000C29749A28' and entitytype=4300)<br />
<br />
-- Get Target Products of a campaign. <br />
<br />
SELECT DISTINCT entityid, Campaign = (SELECT Name FROM Campaign where campaignid = 'B5FCD75A-A1AD-E211-854C-000C29749A28'),<br />
P.ProductNumber, P.name as productname<br />
FROM<br />
FilteredCampaignItem CMP<br />
JOIN Product P ON P.ProductId=CMP.entityid<br />
where campaignid = 'B5FCD75A-A1AD-E211-854C-000C29749A28' and entitytype=1024<br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com2tag:blogger.com,1999:blog-56949280590982116.post-3729841766537220182013-04-30T03:23:00.002-07:002013-10-24T00:40:55.630-07:00Get the last log-in DateTime of CRM user in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
In Microsoft Dynamics CRM 2011 you can get the last log-in time of a CRM user by using the below query:<br />
<br />
SELECT<br />
SU.SystemUserId<br />
,SU.DomainName<br />
,SU.FullName<br />
,SUO.LastAccessTime<br />
FROM SystemUser SU<br />
INNER JOIN [MSCRM_CONFIG].[dbo].[SystemUserOrganizations] SUO ON SUO.CrmUserId = SU.SystemUserId<br />
INNER JOIN [MSCRM_CONFIG].[dbo].[SystemUserAuthentication] SUA ON SUA.UserId = SUO.UserId<br />
ORDER BY SUO.LastAccessTime DESC,SU.DomainName<br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com5tag:blogger.com,1999:blog-56949280590982116.post-26689439646554825042013-04-26T04:00:00.000-07:002013-10-24T00:41:23.089-07:00Get FROM, TO, CC, BCC parties in Reports/SQL in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
It's very common requirement to get the TO and FROM party list in our report for activities. As we know it doesn't store as part of activity/activitypointer. It get stores separably in activityparty table, and all parties are separate entry in activityparty table.<br />
<br />
I wrote a function to get the FROM, TO, CC, BCC or any other party list from CRM in your report. Juse use below function in your report, it will return all parties as comma separated string.<br />
<br />
-- To : To Recipient<br />
-- From : Sender<br />
-- TO get "TO" party list : SELECT [dbo].[fn_GetPartyList] ('B6166B16-9AA2-E211-854C-000C29749A28','To Recipient')<br />
-- TO get "FROM" party list : SELECT [dbo].[fn_GetPartyList] ('B6166B16-9AA2-E211-854C-000C29749A28','Sender')<br />
<br />
CREATE FUNCTION [dbo].[fn_GetPartyList](@ActivityId NVARCHAR(100),@PatryAttribute nvarchar(100))<br />
RETURNS NVARCHAR(MAX)<br />
AS<br />
BEGIN<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DECLARE @Result NVARCHAR(1000)<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DECLARE @Indivisual NVARCHAR(100)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SET @Result=''<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DECLARE @Count INT<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SET @Count =(SELECT COUNT(partyidname) from FilteredActivityParty<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> WHERE participationtypemaskname = @PatryAttribute AND activityid = @ActivityId)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>IF(@Count>0)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>BEGIN<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DECLARE @Table1 TABLE(Row INT IDENTITY(1,1), partyidname nvarchar(100))<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>INSERT INTO @Table1<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SELECT partyidname from FilteredActivityParty<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>WHERE participationtypemaskname = @PatryAttribute AND activityid = @ActivityId<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>WHILE(@Count>=1)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>BEGIN<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SET @Indivisual=(SELECT partyidname FROM @Table1 WHERE Row=@Count)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SET @Result=@Indivisual+','+@Result<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SET @Count=@Count-1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>END<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>END<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DECLARE @LENGTH INT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>SET @LENGTH=LEN(@Result)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>RETURN SUBSTRING(@Result,0,@LENGTH)<br />
END<br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com13tag:blogger.com,1999:blog-56949280590982116.post-28956148527195465222013-04-03T23:34:00.002-07:002013-10-24T00:41:09.814-07:00Get all Attribute Detail of an Entity in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
Use below query to get field specification details of any entity in CRM.<br />
<br />
<br />
SELECT EntityView.Name AS EntityName, LocalizedLabelView_1.Label AS EntityDisplayName,<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>LocalizedLabelView_2.Label AS AttributeDisplayName, AttributeView.Name AS AttributeName,<br />
Type = (select XmlType from MetadataSchema.AttributeTypes where AttributeTypeId = AttributeView.AttributeTypeId)<br />
FROM LocalizedLabelView AS LocalizedLabelView_2<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>INNER JOIN AttributeView ON LocalizedLabelView_2.ObjectId = AttributeView.AttributeId<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>RIGHT OUTER JOIN EntityView<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>INNER JOIN LocalizedLabelView AS LocalizedLabelView_1 ON EntityView.EntityId = LocalizedLabelView_1.ObjectId<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ON AttributeView.EntityId = EntityView.EntityId<br />
WHERE LocalizedLabelView_1.ObjectColumnName = 'LocalizedName'<br />
AND LocalizedLabelView_2.ObjectColumnName = 'DisplayName'<br />
AND LocalizedLabelView_1.LanguageId = '1033'<br />
AND LocalizedLabelView_2.LanguageId = '1033'<br />
AND EntityView.Name IN ('contact') // Change the entity name<br />
order by AttributeDisplayName</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com4tag:blogger.com,1999:blog-56949280590982116.post-46044036601194893262013-03-06T05:14:00.000-08:002013-10-24T00:41:34.406-07:00Apply the run-time filter on top of the security privilege in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
Apply the run-time filter conditions on top of the security privilege to filter/remove/hide the entity records.<br />
<br />
Create a plugin which will trigger on pre (stage) of retrievemultiple (plugin message) of the entity.<br />
Context will return you the Query object which will have entity name and the Query expression details. you can append your filter conditions to query expression to filter the records for the entity.<br />
<br />
Below please find the complete Plugin code.<br />
It will trigger on load of every CRM view, so always check the entity name in the plugin and apply the appropriate logic.<br />
<br />
<br />
<pre class="prettyprint prettyprinted" style="background-color: white; border: 1px solid rgb(136, 136, 136); direction: ltr; font-family: inherit; font-size: 13.333333969116211px; list-style-type: none; outline: 0px; overflow-x: auto; overflow-y: hidden; padding: 2px; word-wrap: normal;"><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">public</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">void</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Execute</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">IServiceProvider</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> serviceProvider</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">)</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="com" style="border: 0px; color: #880000; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">// Obtain the execution context from the service provider.</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">IPluginExecutionContext</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> context </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">IPluginExecutionContext</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">)</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">serviceProvider</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">GetService</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">typeof</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">IPluginExecutionContext</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">));</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">if</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Mode</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">==</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="lit" style="border: 0px; color: #006666; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">0</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">&&</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Stage</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">==</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="lit" style="border: 0px; color: #006666; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">20</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">&&</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">MessageName</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Equals</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"RetrieveMultiple"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">))</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">if</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">InputParameters</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Contains</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"Query"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">))</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">if</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">InputParameters</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">[</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"Query"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">]</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">is</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">QueryExpression</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">)</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">QueryExpression</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> objQueryExpression </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">QueryExpression</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">)</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">InputParameters</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">[</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"Query"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">];</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">if</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">objQueryExpression</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">EntityName</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">==</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"product"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">)</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">IOrganizationServiceFactory</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> serviceFactory </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">IOrganizationServiceFactory</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">)</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">serviceProvider</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">GetService</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">typeof</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">IOrganizationServiceFactory</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">));</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
service </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> serviceFactory</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">CreateOrganizationService</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">UserId</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">);</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">ConditionExpression</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> privateFlagCondition</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">;</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">string</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">SaleType</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">string</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Empty</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">;</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">string</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> role </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">string</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Empty</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">;</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
role </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> getUserRole</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">context</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">UserId</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">);</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">if</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">role</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Contains</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"Sales"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">))</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
privateFlagCondition </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">new</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">ConditionExpression</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">()</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">AttributeName</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"statustype"</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">,</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Operator</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">ConditionOperator</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Equal</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">,</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Values</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="str" style="border: 0px; color: #008800; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">"1"</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">};</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">FilterExpression</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> newFilter </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="kwd" style="border: 0px; color: #000088; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">new</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">FilterExpression</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">()</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">FilterOperator</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">LogicalOperator</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Or</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">,</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Conditions</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">=</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">{</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;"> privateFlagCondition </span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">};</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
objQueryExpression</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">Criteria</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">.</span><span class="typ" style="border: 0px; color: #660066; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">AddFilter</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">(</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">newFilter</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">);</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span><span class="pln" style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">
</span><span class="pun" style="border: 0px; color: #666600; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px;">}</span></pre>
<br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com1tag:blogger.com,1999:blog-56949280590982116.post-9702535082928168422013-01-27T23:02:00.003-08:002013-10-24T00:41:46.955-07:00Direct data entry to PrincipalObjectAccess Table in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
Direct data entry to PrincipalObjectAccess Table using SQL Query. <br />
<u>It is an unsupported approach</u>. Try below SQL query to insert the records in PrincipalObjectAccess table from your table (i have taken the table name as backupTable).<br />
<br />
<br />
<span style="background-color: #999999;">Declare @SystemUser nvarchar(100)</span><br />
<span style="background-color: #999999;">Declare @ObjectId nvarchar(100)</span><br />
<span style="background-color: #999999;">DECLARE @ObjectTypeCode INT</span><br />
<span style="background-color: #999999;">DECLARE @UserType INT</span><br />
<span style="background-color: #999999;">DECLARE @Accessmask INT</span><br />
<span style="background-color: #999999;">DECLARE @InheritedAccessmask INT</span><br />
<br />
<span style="background-color: #999999;">declare Cur_SHAREWITHUSER cursor for </span><br />
<span style="background-color: #999999;">Select ObjectId,Principalid, ObjectTypeCode, PrincipalTypeCode, AccessRightsMask, InheritedAccessRightsMask from backupTable -- (CHange the backup table name)</span><br />
<span style="background-color: #999999;">where AccessRightsMask>0 OR InheritedAccessRightsMask>0</span><br />
<span style="background-color: #999999;"><br /></span><span style="background-color: #999999;">open Cur_SHAREWITHUSER </span><br />
<span style="background-color: #999999;">fetch Cur_SHAREWITHUSER into @ObjectId,@SystemUser,@ObjectTypeCode, @UserType, @Accessmask, @InheritedAccessmask</span><br />
<span style="background-color: #999999;"><br /></span><span style="background-color: #999999;">while(@@fetch_status=0)</span><br />
<span style="background-color: #999999;">BEGIN</span><br />
<span style="background-color: #999999;">INSERT INTO PrincipalObjectAccess </span><br />
<span style="background-color: #999999;">(Principalid,ObjectId,ObjectTypeCode,[PrincipalTypeCode],[AccessRightsMask],ChangedOn,</span><br />
<span style="background-color: #999999;">[InheritedAccessRightsMask] ,PrincipalObjectAccessId )</span><br />
<span style="background-color: #999999;">values (@SystemUser , @ObjectId ,@ObjectTypeCode,@UserType,@Accessmask,GETDATE(),@InheritedAccessmask,NEWID())</span><br />
<br />
<span style="background-color: #999999;">fetch Cur_SHAREWITHUSER into @ObjectId,@SystemUser,@ObjectTypeCode, @UserType,@Accessmask, @InheritedAccessmask</span><br />
<span style="background-color: #999999;"><br /></span><span style="background-color: #999999;">END </span><br />
<br />
<span style="background-color: #999999;">close Cur_SHAREWITHUSER </span><br />
<span style="background-color: #999999;">deallocate Cur_SHAREWITHUSER</span> <br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com1tag:blogger.com,1999:blog-56949280590982116.post-26087458846915414862013-01-21T20:44:00.000-08:002013-10-24T00:41:56.348-07:00Reopened incident count using FetchXML in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
Get all reopened incident count using FetchXML. It will include those tickets also for which state code changed more than twice.<br />
<br />
<fetch aggregate='true'><br />
<entity name='incident'><br />
<attribute name='incidentid' aggregate='countcolumn' alias='countincident' distinct='true' /><br />
<filter type='and'><br />
<condition attribute='statecode' operator='eq' value='0' /><br />
</filter><br />
<link-entity name="incidentresolution" from="incidentid" to="incidentid" alias="aa" distinct='true'><br />
</link-entity><br />
</entity><br />
</fetch><br />
<br />
<br />
<fetch distinct='false' mapping='logical' aggregate='true'><br />
<entity name='incident'><br />
<attribute name='title' alias='IncidentReOpenCount' aggregate='countcolumn' /><br />
<filter type='and'><br />
<condition attribute='statecode' operator='eq' value='0' /><br />
</filter><br />
<link-entity name='incidentresolution' from='incidentid' to='incidentid' alias='aa'><br />
<attribute name='incidentidname' alias='IncidentName' groupby='true' /><br />
</link-entity><br />
</entity><br />
</fetch><br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk5_rsponBXgnDYWijhOuyDHSqvs3vF2UtvKFdix84sWsHwDluNXDslC1AgwuqEQ7u1gOiEe_FPdmRBWxD1Qe9KyzoGNWwlBrBkqaS3lwVaEU0Fv8aub_H_4tctwckgHFiOyZ4y0iSRg/s1600/224833.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="424" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk5_rsponBXgnDYWijhOuyDHSqvs3vF2UtvKFdix84sWsHwDluNXDslC1AgwuqEQ7u1gOiEe_FPdmRBWxD1Qe9KyzoGNWwlBrBkqaS3lwVaEU0Fv8aub_H_4tctwckgHFiOyZ4y0iSRg/s640/224833.png" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com2tag:blogger.com,1999:blog-56949280590982116.post-65131954112947811462013-01-21T02:16:00.000-08:002013-10-24T00:42:05.176-07:00Get shared records for a User/Team in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<u>Get shared records for a User/Team:</u><br />
<u><br /></u>
We get very frequent requirement on how to get the shared records for a User/Team in Plugin/web application using CRM SDK/service.<br />
<br />
I prepared below fetchXML which returns all shared records of an entity for a user/Team.<br />
<br />
Its a generic fetchXML. Just we need to replace 3 value.<br />
1. Entity name (just replace account with any crm entity).<br />
2. Primary field (for account it is accountid). It is used to join principalobjectaccess and the entity. So just provide the entity primary field in "to".<br />
3. User/Team GUID. (just replace the user/team GUID in value).<br />
<br />
<span style="background-color: #eeeeee;"><fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'></span><br />
<span style="background-color: #eeeeee;"> <entity name='account'></span><br />
<span style="background-color: #eeeeee;"><span class="Apple-tab-span" style="white-space: pre;"> </span><link-entity name='principalobjectaccess' to='accountid' from='objectid' link-type='inner' alias='share'></span><br />
<span style="background-color: #eeeeee;"><span class="Apple-tab-span" style="white-space: pre;"> </span> <filter type='and'></span><br />
<span style="background-color: #eeeeee;"><span class="Apple-tab-span" style="white-space: pre;"> </span> <condition attribute='principalid' operator='eq' value='E36D3084-8135-E211-AC03-000C29AD15D1' /></span><br />
<span style="background-color: #eeeeee;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </filter></span><br />
<span style="background-color: #eeeeee;"><span class="Apple-tab-span" style="white-space: pre;"> </span></link-entity></span><br />
<span style="background-color: #eeeeee;"> </entity></span><br />
<span style="background-color: #eeeeee;"></fetch></span></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com4tag:blogger.com,1999:blog-56949280590982116.post-45463032862897857392013-01-08T20:37:00.001-08:002013-10-24T00:42:14.991-07:00Hide Entity from Advanced Find in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Hide Entity from Advanced Find<br />
<br />
As you know You should be able to handle this through security role, don't provide read permission on that entity to particular user, and it will be hidden for him.<br />
But if you have read privilege on the entity and still you want that entity not to be shown in Advanced find then there is no supported way.<br />
<br />
But there is an unsupported way to achieve the same. CRM exposes below Boolean property in EntityMetadata to identify which entity should appear in Advanced Find.<br />
<br />
EntityMetadata.IsValidForAdvancedFind Property - Gets or sets whether the entity is will be shown in Advanced Find.<br />
AttributeMetadata.IsValidForAdvancedFind Property - Gets or sets the property that determines whether the attribute appears in Advanced Find.<br />
<br />
Try below query to hide Account entity from Advanced Find.<br />
<br />
update MetadataSchema.Entity set IsValidForAdvancedFind = 0 where Name = 'account'<br />
<br />
update MetadataSchema.Relationship set IsValidForAdvancedFind = 0<br />
where ReferencingEntityId = (select MetadataSchema.Entity.EntityId from MetadataSchema.Entity where Name = 'account')<br />
and IsValidForAdvancedFind = 1<br />
<br />
<br />
Reset IIS and clear server(and client) cache.<br />
<br />
This will hide the entity for all users on the Advanced Find.</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com6tag:blogger.com,1999:blog-56949280590982116.post-69616660856336826142013-01-08T05:26:00.003-08:002013-01-08T05:26:22.924-08:00CRM 2011 views: getting more than 5000 records<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
If you access any CRM views for example account page and if it got more the 5000 records you will see “5000+”. You can update this limit by running following query again MSCRM_Config database, so IntColumn contains number of maximum records to be run for CRM. If you put value -1 it will retrieve all the records.<br />
<br />
Update DeploymentProperties Set IntColumn=-1 Where ColumnName = 'TotalRecordCountLimit'<br />
<br />
So IntColumn contains number of maximum records to be run for CRM. If you put value -1 it will retrieve all the records<br />
<br />
<br />
Note<br />
1. Above change is unsupported so make sure you apply this change to Dev, Test environment before applying this to Live environment. Also make sure you take back up of database before doing this change<br />
2. This change might impact performance as well since system will retrieve all the records.<br />
<br />
Reference : <a href="https://community.dynamics.com/product/crm/crmtechnical/b/crmmayankp/archive/2012/06/15/crm-2011-views-getting-more-than-5000-records.aspx">https://community.dynamics.com/product/crm/crmtechnical/b/crmmayankp/archive/2012/06/15/crm-2011-views-getting-more-than-5000-records.aspx</a><br />
</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com4tag:blogger.com,1999:blog-56949280590982116.post-64298819303759643172013-01-08T05:03:00.003-08:002013-10-24T00:42:30.799-07:00Read Subject sub-child from tree structure in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Always its difficult to get the Subject Tree structure to implement your business logic.<br />
I have written CTE to access the sub-child just by passing the Root level Subject.<br />
<br />
Create the function in CRM database.<br />
<br />
CREATE FUNCTION [dbo].[GetDownSubjectHierarchy] ( @SubjectId NVARCHAR(100))<br />
RETURNS TABLE<br />
AS<br />
RETURN<br />
(<br />
WITH DirectReports (ParentSubject, ParentSubjectName, SubjectId, Title, Level)<br />
AS<br />
(<br />
-- Anchor member definition<br />
SELECT FSU1.ParentSubject,FSU1.ParentSubjectName, FSU1.SubjectId, FSU1.Title,0 AS Level<br />
FROM dbo.Filteredsubject AS FSU1<br />
WHERE SubjectId = @SubjectId<br />
<br />
UNION ALL<br />
-- Recursive member definition<br />
SELECT FSU1.ParentSubject,FSU1.ParentSubjectName, FSU1.SubjectId, FSU1.Title, Level + 1<br />
FROM dbo.Filteredsubject AS FSU1<br />
INNER JOIN DirectReports AS d<br />
ON FSU1.ParentSubject = d.SubjectId<br />
)<br />
<br />
-- Statement that executes the CTE<br />
SELECT Distinct * FROM DirectReports d<br />
)<br />
<br />
Execute the below query to get the Subject sub-child of (down) level 2 by passing the subjectid.<br />
<br />
SELECT * FROM [GetDownSubjectHierarchy]('35344367-8535-E211-AC03-000C29AD15D1')<br />
WHERE Level=2<br />
<br />
Just execute the Query and store the result in array/list/data set/data table as you want to execute your business logic.<br />
<br />
You can get the sub-child of any level, just change the value of level (0 is the root subject).</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com2tag:blogger.com,1999:blog-56949280590982116.post-82233441765964258092013-01-03T21:43:00.004-08:002013-10-24T00:42:44.734-07:00Adding a view to the sitemap in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<h4>
<div>
<span style="font-weight: normal;">Follow the below steps to Add a view to the sitemap.</span></div>
<ol>
<li><span style="font-weight: normal;">Open the sitemap editor.</span></li>
<li><span style="font-weight: normal;">Load the Sitemap for your organization.</span></li>
<li><span style="font-weight: normal;">Add a new Sub Area (under any group you want to add)</span></li>
<li><span style="font-weight: normal;">Go to the property of the sub area (right pan).</span></li>
<li><span style="font-weight: normal;">Enter the title, description and define other properties as needed.</span></li>
<li><span style="font-weight: normal;">Enter the entity Name. It can be the entity you want to load the view or any other entity/custom entity. </span></li>
<li><span style="font-weight: normal;">Enter the URL to load the entity view.</span></li>
<li><span style="font-weight: normal;">Save the Properties and click on update sitemap.</span></li>
<li><span style="font-weight: normal;">Refresh CRM to view the Account view added in sitemap.</span></li>
</ol>
<span style="font-weight: normal;">Example : To load the account view named "Accounts: No Campaign Activities in Last 3 Months" in sitemap use the below URL. <span style="color: blue;"> <u>/_root/homepage.aspx?etn=account&viewid={CFBCD7AF-AEE5-4E45-8ECC-C040D4020581}&viewtype=1039</u></span></span><br /><span style="font-weight: normal;"><span style="color: blue;"><u><br /></u></span>Entity name as : account<br />Query the CRM database SavedQuery table to get the viewid of any entity. Also you can copy the Viewid from CRM by navigating to the corresponding view and then click on "Copy a link" of current View.<br />Viewid for the account view named "Accounts: No Campaign Activities in Last 3 Months" is {CFBCD7AF-AEE5-4E45-8ECC-C040D4020581}</span><br /><span style="font-weight: normal;"><br />Viewtype 1039 is the objecttypecode of the SavedQuery entity.</span></h4>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd01nG_ff2mAsE0URQZT_BnRX-KrFvI3T3z1VcM9rIbjPkXzbyCw9M5w4cn1Aqy3bgd6YXzBZwxICO3OA5_hN_HiKFG01Itx34G64Vj_PMonU0FMz3Tlb60cqP07ECEkfeNXqK9OczHw/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd01nG_ff2mAsE0URQZT_BnRX-KrFvI3T3z1VcM9rIbjPkXzbyCw9M5w4cn1Aqy3bgd6YXzBZwxICO3OA5_hN_HiKFG01Itx34G64Vj_PMonU0FMz3Tlb60cqP07ECEkfeNXqK9OczHw/s400/1.png" width="375" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXkSGnH_I_p7-xpKzSQCWth2wUyZk0LG31ee-kuhjZiLyFMnXCiyb3AxdG2mAU3i4o_lX_BYiKZEZyhuWci1I-6j5fT9UJGHxvXG2ftZ0zELt8tE0Hj37lOfvHWtNePDyM7xgNiq59w/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="304" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXkSGnH_I_p7-xpKzSQCWth2wUyZk0LG31ee-kuhjZiLyFMnXCiyb3AxdG2mAU3i4o_lX_BYiKZEZyhuWci1I-6j5fT9UJGHxvXG2ftZ0zELt8tE0Hj37lOfvHWtNePDyM7xgNiq59w/s640/2.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h4 style="text-align: left;">
<div style="text-align: left;">
<span style="font-weight: normal;">Note : If the entered viewid doesn't belongs to the corresponding entity, sitemap will load the default view for the entity. </span></div>
<span style="font-weight: normal;"><br />Reference take from : <a href="http://blogs.infinite-x.net/2011/04/18/crm-2011-adding-a-view-to-the-sitemap/">http://blogs.infinite-x.net/2011/04/18/crm-2011-adding-a-view-to-the-sitemap/</a></span></h4>
</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com3tag:blogger.com,1999:blog-56949280590982116.post-81505727628356391192012-12-09T21:34:00.004-08:002013-10-24T00:43:04.274-07:00Release Update News For Microsoft Dynamics CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<b>The next CRM release scheduled for Q4 2012 will include:</b><br />
<br />
• Cross Browser Support<br />
• Microsoft Dynamics CRM Mobile<br />
• Office 2013 Compatibility<br />
• New process driven user interface<br />
• Updated opportunity management processes<br />
• Improved case management<br />
• Service monitoring & analytics<br />
<br />
<b>Lined up for the first release of 2013, due in Q1 2013 are:</b><br />
<br />
• Further process driven CRM enhancements<br />
• Extended Office 2013 capabilities for CRM<br />
• Sales hierarchy levels<br />
• Service hierarchies<br />
• Server side sync with Exchange<br />
<br />
<br />
<b>For more information, follow below link :</b><br />
<a href="http://www.preact.co.uk/preact_blog/release-update-news-for-microsoft-dynamics-crm">http://www.preact.co.uk/preact_blog/release-update-news-for-microsoft-dynamics-crm</a><br />
<a href="http://www.preact.co.uk/preact_blog/microsoft-dynamics-crm-cross-browser-update-2013-release-schedule">http://www.preact.co.uk/preact_blog/microsoft-dynamics-crm-cross-browser-update-2013-release-schedule</a></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com1tag:blogger.com,1999:blog-56949280590982116.post-40565759331875081052012-11-29T03:55:00.001-08:002012-11-29T03:55:21.844-08:00Jscript Reference for Microsoft Dynamics CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="background-color: white; color: #555555; font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 10px; padding: 0px;">
Here’s a quick reference guide covering Microsoft CRM 2011’s syntax for common jscript requirements. </div>
<div style="background-color: white; color: #555555; font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 10px; padding: 0px;">
Most of the examples are provided as functions that you can easily test in the OnLoad event of the Entity form to see a working example. </div>
<div style="background-color: white; color: #555555; font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 10px; padding: 0px;">
<a href="http://garethtuckercrm.com/2011/03/16/jscript-reference-for-microsoft-dynamics-crm-2011/">http://garethtuckercrm.com/2011/03/16/jscript-reference-for-microsoft-dynamics-crm-2011/</a></div>
<div style="background-color: white; color: #555555; font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 10px; padding: 0px;">
<br /></div>
<div style="background-color: white; color: #555555; font-family: Verdana, 'BitStream vera Sans', Helvetica, sans-serif; font-size: 12px; line-height: 17px; margin-bottom: 10px; padding: 0px;">
<br /></div>
</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com0tag:blogger.com,1999:blog-56949280590982116.post-91598994056565803962012-11-25T21:33:00.001-08:002012-11-25T21:33:09.288-08:00Custom Lookup with multiple entity in CRM 2011 <div dir="ltr" style="text-align: left;" trbidi="on">
If you create custom lookup in CRM, this lookup is oriented only for one entity.<br />
<br />
A very good post to create customer lookup using simple JS. <br />
<br />
In a custom lookup we can configure our own entity list. Give a try.<br /><br />
<a href="http://mscrmgoodies.blogspot.in/2012/02/custom-lookup-in-crm-2011.html">http://mscrmgoodies.blogspot.in/2012/02/custom-lookup-in-crm-2011.html</a></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com1tag:blogger.com,1999:blog-56949280590982116.post-89628112623380318562012-08-24T05:26:00.000-07:002013-10-24T00:43:13.151-07:00Set the CRM Form as Read Only in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
function setFormAsReadOnly() {<br />
// define the logic here<br />
disableFormFields(true);<br />
}<br />
<br />
function doesControlHaveAttribute(control) {<br />
var controlType = control.getControlType();<br />
return controlType != "iframe" && controlType != "webresource" && controlType != "subgrid";<br />
}<br />
<br />
function disableFormFields(onOff) {<br />
<br />
Xrm.Page.ui.controls.forEach(function(control, index) {<br />
if (doesControlHaveAttribute(control)) {<br />
control.setDisabled(onOff);<br />
}<br />
});<br />
}<br />
<div>
<br /></div>
</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com2tag:blogger.com,1999:blog-56949280590982116.post-7107340997697473422012-08-24T05:15:00.000-07:002013-10-24T00:43:24.122-07:00Custom Button on CRM Form in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Create a text box. (or use any unsed field)<br />
Place the field on the CRM Form.<br />
Through the script convert them to a Button on the CRM Form.<br />
Attach the OnCLick event to the Button.<br />
Define your own custom logic on Button Click.<br />
<br />
<br />
function CreateButton() {<br />
ConvertToButton('new_testbutton', 'New Button', '100px', OpenSearchPage, 'Button Label');<br />
}<br />
<br />
<br />
function ConvertToButton(fieldname, buttontext, buttonwidth, clickevent, title) {<br />
//check if object exists; else return<br />
if (document.getElementById(fieldname) == null) {<br />
return;<br />
}<br />
functiontocall = clickevent;<br />
crmForm.all[fieldname].DataValue = buttontext;<br />
crmForm.all[fieldname].readOnly = true;<br />
crmForm.all[fieldname].style.borderRight = "#3366cc 1px solid";<br />
crmForm.all[fieldname].style.paddingRight = "5px";<br />
crmForm.all[fieldname].style.borderTop = "#3366cc 1px solid";<br />
crmForm.all[fieldname].style.paddingLeft = "5px";<br />
crmForm.all[fieldname].style.fontSize = "11px";<br />
crmForm.all[fieldname].style.backgroundImage = "url(/_imgs/btn_rest.gif)";<br />
crmForm.all[fieldname].style.borderLeft = "#3366cc 1px solid";<br />
crmForm.all[fieldname].style.width = buttonwidth;<br />
crmForm.all[fieldname].style.cursor = "hand";<br />
crmForm.all[fieldname].style.lineHeight = "18px";<br />
crmForm.all[fieldname].style.borderBottom = "#3366cc 1px solid";<br />
crmForm.all[fieldname].style.backgroundRepeat = "repeat-x";<br />
crmForm.all[fieldname].style.fontFamily = "Tahoma";<br />
crmForm.all[fieldname].style.height = "20px";<br />
crmForm.all[fieldname].style.backgroundColor = "#cee7ff";<br />
crmForm.all[fieldname].style.textAlign = "center";<br />
crmForm.all[fieldname].style.overflow = "hidden";<br />
crmForm.all[fieldname].attachEvent("onmousedown", push_button);<br />
crmForm.all[fieldname].attachEvent("onmouseup", release_button);<br />
crmForm.all[fieldname].attachEvent("onclick", functiontocall);<br />
crmForm.all[fieldname].style.lineHeight = "14px";<br />
crmForm.all[fieldname + '_c'].style.visibility = 'hidden';<br />
crmForm.all[fieldname].title = title;<br />
window.focus();<br />
<br />
function push_button() {<br />
window.event.srcElement.style.borderWidth = "2px";<br />
window.event.srcElement.style.borderStyle = "groove ridge ridge groove";<br />
window.event.srcElement.style.borderColor = "#3366cc #4080f0 #4080f0 #3366cc";<br />
}<br />
<br />
function release_button() {<br />
window.event.srcElement.style.border = "1px solid #3366cc";<br />
}<br />
}<br />
<br />
function OpenSearchPage() {<br />
var features = "location=no,menubar=no,status=no,toolbar=no";<br />
// Open the window<br />
window.open("http://SearchPage.aspx"_blank", features, false);<br />
}<br />
<br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com0tag:blogger.com,1999:blog-56949280590982116.post-25299659959926490682012-08-20T05:36:00.001-07:002012-08-20T05:36:13.657-07:00CRM 2011 Online Fetch XML Reporting<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span class="apple-style-span"><span style="color: #333333; font-family: "Verdana","sans-serif"; font-size: 10.0pt;">Very informative post</span>
on CRM 2011 Online Fetch XML Reporting. <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span class="apple-style-span"><span style="color: #333333; font-family: "Verdana","sans-serif"; font-size: 10.0pt;">Getting Started with CRM 2011
Online Fetch XML Reporting<o:p></o:p></span></span></div>
<div class="MsoNormal">
<a href="http://gtcrm.wordpress.com/2011/03/24/fetch-xml-reports-for-crm-2011-online/">http://gtcrm.wordpress.com/2011/03/24/fetch-xml-reports-for-crm-2011-online/</a><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Verdana","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;">More details on Fetch-Xml based Reports<o:p></o:p></span></div>
<div class="MsoNormal">
<a href="http://blogs.msdn.com/b/crm/archive/2011/02/23/fetch-xml-based-reports-bits-amp-pieces.aspx">http://blogs.msdn.com/b/crm/archive/2011/02/23/fetch-xml-based-reports-bits-amp-pieces.aspx</a><span style="color: black; font-family: "Verdana","sans-serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-theme-font: minor-fareast; mso-no-proof: yes;"><o:p></o:p></span></div>
</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com0tag:blogger.com,1999:blog-56949280590982116.post-44326729483191429412012-08-14T05:56:00.002-07:002013-10-24T00:44:16.217-07:00Secure / Unsecure Configuration of Plugin Registration tool in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
Difference between Secure / Unsecure Configuration of Plugin Registration tool in CRM 2011<br />
<br />
<a href="http://crmdm.blogspot.in/2011/06/difference-between-secure-unsecure.html">http://crmdm.blogspot.in/2011/06/difference-between-secure-unsecure.html</a><br />
Very nice post. I had problem while using Secure Configuration for few users, so i used to change the user context in plugin registration as CRM admin. Was not aware of the route cause.<br />
<div>
<br /></div>
<br />
<br /></div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com0tag:blogger.com,1999:blog-56949280590982116.post-81689589813816290292012-08-02T04:32:00.002-07:002013-10-24T00:44:38.433-07:00Hide/Show CRM form navigation Items in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
function setNavigationVisibility(navItem, value) {<br />
var navitem = Xrm.Page.ui.navigation.items.get(navItem);<br />
if (navitem == null) {<br />
return;<br />
}<br />
navitem.setVisible(value);<br />
}</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com0tag:blogger.com,1999:blog-56949280590982116.post-33149095106650850462012-08-02T04:31:00.003-07:002013-10-24T00:45:16.195-07:00Hide Date part from CRM DateTime Field on CRM form in MS CRM 2011<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
function removeDateField(attribute) {<br />
document.getElementById(attribute).childNodes[0].childNodes[0].style.display = "none";<br />
document.getElementById(attribute).childNodes[0].childNodes[1].style.display = "none";<br />
}</div>
Chandan Kumar Choudharyhttp://www.blogger.com/profile/14299538502247901606noreply@blogger.com1