الثلاثاء، 27 أغسطس 2013

CRM 2011: Handling Tab click event

///************* Handing All From Tabs click event *****************

function TabsClickeHandler(MyFunctionName) {
            var TabLinksContainer = document.getElementById("ulTabLinks");
            var Li_items = TabLinksContainer.getElementsByTagName("li");
            for (var i = 0; i < Li_items.length; ++i) {
                //Get 'a' Tages Name.
                var Links = Li_items[i].getElementsByTagName("a");

                if (Links[0].addEventListener) {   // all browsers except IE before version 9
                    //Attach ‘onclick’ event handler to "Tab"
                    Links[0].addEventListener("click", function () { MyFunctionName(); }, false);
                }
                else if (Link[0].attachEvent) {    // IE before version 9
                    //Attach ‘onclick’ event handler to "Tab"
                    Links[0].attachEvent('onclick', function () { MyFunctionName(); });
                }
            }
        }
///**************** Handing  Only One Tab click event ********

function OneTabClickeHandler(TabId,MyFunctionName) {
            //the ID of ‘tab’
            var Tab = document.getElementById(TabId);

                if (Tab.addEventListener) {   // all browsers except IE before version 9
                    //Attach ‘onclick’ event handler to "Tab"
                    Tab.addEventListener("click", function () { MyFunctionName(); }, false);
                }
                else if (Tab.attachEvent) {    // IE before version 9
                    //Attach ‘onclick’ event handler to "Tab"
                    Tab.attachEvent('onclick', function () { MyFunctionName(); });
                }
        }

الثلاثاء، 20 أغسطس 2013

SSRS: Cannot create a connection to data source ‘CRM.’ (rsErrorOpeningConnection) Guid should contain 32 digits with 4 dashes


To run the report from the report server Url, you might find that if you are using normal domain account for username/password you will get the following error:


An error has occurred during report processing (rsProcessingAborted) Cannot create a connection to data source ‘CRM.’ (rsErrorOpeningConnection) Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

This is because the Username should be 'systemuserid' and the Password should be 'organizationid'. You can get this by running the query against the CRM database:


SELECT fullname, systemuserid, organizationid FROM FilteredSystemUser Order By fullname

الأحد، 18 أغسطس 2013

How to Select from stored procedure in SQL?

We can't execute a Stored Procedure in a Select statement.You can use a User-defined function or a view instead of a procedure

 but you can copy output from Stored Procedure to temporary table as blow:

CREATE TABLE #Result
(
  Column_Name1 Nvarchar(50),  
  Column_Name2 Int
)
INSERT #Result exec Stored_Procedure_Name @Parameter1,@Parameter2
SELECT Sum(Column_Name2) as Total  FROM #Result
where "Condition Here"
DROP TABLE #Result

الأحد، 7 يوليو 2013

Unable to Change Domain Logon Name error in CRM 2011.

1- Change “AutoGroupManagementoff” value set to 1 (false) in your registry (HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft \MSCRM).
2- be sure that CRMAppPool is identified as "Network Service"

السبت، 6 يوليو 2013

Report render failure. Error: An error has occurred during report processing. (rsProcessingAborted)

setspn -L ADGROUP\dynamicsadmin

setspn -L ADGROUP\CRMSandbox

setspn -A http/WIN2K8-SQL2K8 ADGROUP\dynamicsadmin

setspn -A http/WIN2K8-SQL2K8.fqdn.com ADGROUP\dynamicsadmin

-- Also if the error contains the below details.

"System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://ed-crmweb01/CrmSandboxSdkListener-w3wp. The connection attempt lasted for a time span of 00:00:21.0468750. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.29.3.4:808. "

Then try adding an inbound rule to the Windows firewall allowing TCP traffic on port 808, domain network. 


Also you will find a full solutions on the following link:
http://blog.cobalt.net/blog/4-steps-that-will-help-you-conquer-the-rsprocessingaborted-error