Search This Blog

Thursday, December 15, 2016

Retrieve more than 5000 record in Query expression or Limit number of result record in query expression

 https://msdn.microsoft.com/en-us/library/gg327917.aspx


// Query using the paging cookie.
// Define the paging attributes.
// The number of records per page to retrieve.
int queryCount = 3;

// Initialize the page number.
int pageNumber = 1;

// Initialize the number of records.
int recordCount = 0;

// Define the condition expression for retrieving records.
ConditionExpression pagecondition = new ConditionExpression();
pagecondition.AttributeName = "parentaccountid";
pagecondition.Operator = ConditionOperator.Equal;
pagecondition.Values.Add(_parentAccountId);

// Define the order expression to retrieve the records.
OrderExpression order = new OrderExpression();
order.AttributeName = "name";
order.OrderType = OrderType.Ascending;

// Create the query expression and add condition.
QueryExpression pagequery = new QueryExpression();
pagequery.EntityName = "account";
pagequery.Criteria.AddCondition(pagecondition);
pagequery.Orders.Add(order);
pagequery.ColumnSet.AddColumns("name", "emailaddress1");                   

// Assign the pageinfo properties to the query expression.
pagequery.PageInfo = new PagingInfo();
pagequery.PageInfo.Count = queryCount;
pagequery.PageInfo.PageNumber = pageNumber;

// The current paging cookie. When retrieving the first page, 
// pagingCookie should be null.
pagequery.PageInfo.PagingCookie = null;
Console.WriteLine("Retrieving sample account records in pages...\n");
Console.WriteLine("#\tAccount Name\t\tEmail Address"); 

while (true)
{
    // Retrieve the page.
    EntityCollection results = _serviceProxy.RetrieveMultiple(pagequery);
    if (results.Entities != null)
    {
        // Retrieve all records from the result set.
        foreach (Account acct in results.Entities)
        {
            Console.WriteLine("{0}.\t{1}\t{2}", ++recordCount, acct.Name,
                               acct.EMailAddress1);
        }
    }

    // Check for more records, if it returns true.
    if (results.MoreRecords)
    {
        Console.WriteLine("\n****************\nPage number {0}\n****************", pagequery.PageInfo.PageNumber);
        Console.WriteLine("#\tAccount Name\t\tEmail Address");

        // Increment the page number to retrieve the next page.
        pagequery.PageInfo.PageNumber++;

        // Set the paging cookie to the paging cookie returned from current results.
        pagequery.PageInfo.PagingCookie = results.PagingCookie;
    }
    else
    {
        // If no more records are in the result nodes, exit the loop.
        break;
    }
}

CRM Form Load Performance

CRM Form Load Performance
Open the CRM on-premises and online in internet explorer.Click ctrl+shift+e

Send Mail when error occur in Scribe tool

Send Mail when error occur in Scribe tool

In scribe we have to alert recipents

Alert Recipients provide a means to notify users of alerts. Groups are formed from a stored list of individuals, each with an email address. Monitors and Integration Processes may be configured to notify a specific group and provide information on system status, data states, or business activity.


Adding alert recipient

Configure the email address

Create alert group and add recipients to group

Assigning a Recipient group in Monitor’s alert criteria






Append vs Append To

Append and Append To basically deal with the entities that are parties to a 1:N relationship or N:1 relationship.

Append: When an entity has the lookup of another entity on its form. It is important that the user have the “Append” privilege on this entity so that it can set the values for the lookups on this entity. For eg: Contact has the lookup of Account on its form so here the user needs to have the “Append” privilege to be able to set the parent account.

Append To: When an entity is available as a lookup on another entity form. It is important that the user have the “Append to” privilege on the entity that is referred to in the lookup so that it can set the values for the lookups of this entity on any other form. For eg: Account has the lookup of primary contact. So here the user needs to have the “Append To” privilege to be able to set the Primary Contact for the Account.

Report Server Folder Location

Native mode report server:
C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer
Sharepoint mode report server:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\WebServices\Reporting
Please look into below site:
https://msdn.microsoft.com/en-us/library/ms157273.aspx

CRM Plugin Message Export,ExportAll,ExportCompressed,ExportCompressedAll fire in plugin


1. Connect to SQL Server where CRM DB is located.
2. Open SQL Management Studio, open new query with context of your CRM DB (CRM_MSCRM or other name).
3. Execute following T-SQL Script:
Update SdkMessageFilter
Set IsCustomProcessingStepAllowed = 1
Where SdkMessageId in (Select distinct SdkMessageId From sdkmessage where name = 'ExportSolution')
4. Make IISReset.

5. Restart plugin registration tool - ExportSolution should be available for handling with plugins.

Wednesday, October 12, 2016

Different values with Date() in Chrome and IE

Different values with Date() in Chrome and IE

IE

Chrome



It is a bug in the ECMAScript 5.1 spec https://bugs.ecmascript.org/show_bug.cgi?id=112. From the comments on the bug, it appears that Chrome 35 implements what the spec says (literally), while IE 10 implements what the spec actually intended to say.
The bug relates to the same sentence in the spec mentioned in the question:
ECMA-262 edition 5.1 (p. 179): The value of an of absent time zone offset is "Z".
The draft version ECMAScript 6 (http://people.mozilla.org/~jorendorff/es6-draft.html) changes this sentence to:
If the time zone offset is absent, the date-time is interpreted as a local time.