Wednesday, July 20, 2011

MySQL Keyword for Retrieving the Top 1000 records

We need to use the limit keyword for this. This is equal to Top keyword in MSSQL server.

Select  * from [DatabaseName].[tablename] Limit 1,1000

Oracle Extract Function

This function is pretty much similar to SQL datepart function. Syntax is given below. This was taken from the below URL. 


EXTRACT ({ YEAR | MONTH | DAY | HOUR | MINUTE | SECOND }
| { TIMEZONE_HOUR | TIMEZONE_MINUTE }
| { TIMEZONE_REGION | TIMEZONE_ABBR }
FROM { date_value | interval_value } )

You can take year, month and day separately using this function.


extract(YEAR FROM DATE '2011-07-20') would return 2011
extract(MONTH FROM DATE '2011-07-20') would return 7
extract(DAY FROM DATE '2011-07-20') would return 20

Wednesday, July 6, 2011

Adding a Dataset value to a TextBox in Header or Footer of the report

Is this possible?
No, it is not. When you do this and try to view the report you get an error stating that cannot add dataset values to report header or footer.

Is there a way to overcome this?.
Fortunately there is. How?.

You can add a textbox to the report body and you can set the expression of that textbox to a dataset value. Then you can assign this text box as a report parameter to the text box in your header. works like a charm.

However if you want the footer or header to be repeating in all the pages of the report you need to add columns to the report table. Then you need to hide them and assign to report header or footer textboxes.

Tuesday, July 5, 2011

CRM4 SQL Functions

There are a lot of SQL functions that we can use when we are doing reports in CRM. The following  article describes about them.

http://blogs.infinite-x.net/2009/02/20/using-built-in-crm-functions-when-writing-sql-reports/

Difference between Parent and Child Pipelines

We see this a lot when we publish plugins through the plugin deployer. We don't tend to notice this as we most of the time user Parent pipeline. But why there is another Pipe Line.

The reason for this is simple.

If you open the entity from CRM without going to it from another CRM record this would be the parent pipe line.
If you go to the same entity record through another entities record it would be the child pipe line.

If you have written a plugin for a particular entity and have used the parent pipe line then it would not fire id the same scenario happens if you have to come the record through another record.

There is a very nice article about this written in the following web link. This helped me too to understand the difference. This was given to me by a colleague of mine.

http://crmscape.blogspot.com/2009/02/ms-crm-40-plug-in-stages-pipelines-and.html

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...