Friday, July 1, 2011

CRM Online :- Setting up an efficient developer environment for SilverLight resources

I've started working on a project where i am supposed to build a silverlight web resource for CRM Online and test it. The Web Resource will use CRM OData APIs to communicate with the CRM Online system and hence it can be tested only once it is hosted within an HTML page which is hosted in a CRM Online as a web Resource. 
Now here are the steps one needs to follow in order to debug this silverlight code..
1) Upload the xap file as a web resource in the CRM Online instance using the Web UI
2) Publish the xap file 
3) Navigate to the html file using the URL 
4) Attach the IE to visual studio and then debug the code by setting break points 

This makes the debugging and developing the applications very tedious since every build means that i have to upload the resource and do navigation as well... 
In order to make this process efficient here is the setup i have done on my machine 

1) Use Web Resource Upload Utility to upload the xap file on CRM Online instance. Now every time you build your solution all you need to do is to click a button to upload and publish the new xap file to CRM Online instance. 
2) In the web project you got created when you create a silverlight project add a new html page where onload of the body redirect the browser to the url where your html file is added. Here's how the code of html might look like...

Set this html page as the startup page when you debug the stuff...

And you are set... 
Now every time you change your code the debug process looks like the following
1) Build the silverlight project and use the web resource upload utility to upload the xap file 
2) Press F5 and the html page you've in your web project will redirect you to CRM Online where your xap is being hosted 

And you are set. I might work on a command line utility to build and publish the xap file on CRM Online instance if it becomes a lengthy project. But for a small POC kind of work this is much more efficient then the normal way one has to follow...

hope this helps 

CRM Online :- How to get the organization name

While working with CRM Online sometimes it is necessary to get the organization name to do some tasks (Like using a Web Resource Upload Utility)
Now in an on premise CRM system the organization name can be found from the URL or from the deployment manager. But there's no such flexibility in case of CRM Online. 
To get the organization unique name you need to go to 
Settings -> Customization -> Developer Resources and there you would find the name of the organization as you can see in the below screenshot. 

This is the organization name you can use to connect to your CRM Online instance with utilities such as Web Resource Upload Utility :)



Monday, June 13, 2011

How to use Sharepoint Cmdlets in powershell

To use the powershell commandlets in sharepoint 2010 one needs to add the ps snapin  Microsoft.SharePoint.PowerShell which can be done using the following command on windows powershell

Add-PSSnapin Microsoft.SharePoint.PowerShell.


Wednesday, June 8, 2011

CRM 2011 :- Error while Scheduling a report to run

I tried scheduling a report to run on a daily basis and store the snapshots for the user in the CRM 2011 system. Doing this was simple as i selected the report in the reports view and did the scheduling. 
However the report snapshots were not getting displayed at all and every time i tried to open the snapshot it gave an error saying "The selected report is not ready for viewing. The report is still being rendered or a report snapshot is not available. (rsReportNotReady)"

The culprit was the fact that Snapshot isolation was turned on in my reportserver database. To get rid of this error and to allow the snapshots to be running properly i executed the following query on my reportserver databse and i was good to go...


Hope this helps in case you are stuck while trying to schedule the reports in your CRM installation. 


Wednesday, May 25, 2011

Stunnware Fetch Xml Doesn't show the attribute of an entity

If you use the Fetch Xml Wizard from Stunnware sometimes you may face an issue where the Wizard doesn't show one of the attributes which you added to an entity in the Attribute Picker. This happened to me recently and when i did a little investigation i figured out that the Wizard maintains a offline metadata cache for your organization in "%localappdata%\Stunnware\Stunnware Tools Metadata Cache" folder to improve performance.
Now sometimes the cache doesn't get refreshed after you make a change in the CRM metadata on the server. To fix this you need to exit the stunnware tools wizard and delete the folder from the path "%localappdata%\Stunnware\Stunnware Tools Metadata Cache" and boom you'd see your changes being reflected on the wizard.



Tuesday, February 22, 2011

Reading a VHD File

If you ever need to read a vhd file for reasons like you lost the password for your vpc etc there's a cool feature in Windows 7 using which you can mount the vhd file on your hard disk. 
You can do so by following the steps below 
1) Open Computer Management 
2) Go to Storage -> Disk Management and click on it
3) Once the Panel opens you can right click on Disk Management and you would see an option called Attach VHD 

4) Click on Attach VHD option. It will popup a dialog asking for location of your VHD
5) Browse to you VHD select and click OK on the dialog and Voila all the data on your VHD is mounted as a partition on your machine. 

Have fun :)


Wednesday, January 5, 2011

Telnet not working on Windows Server 2008

While trying to test my SMTP server connectivity i wanted to use telnet on my Windows Server 2008 box. So i did the usual thing i.e. went to command prompt and typed "telnet servername port" and voila i got an error which said "'telnet' is not recognized as an internal or external command,operable program or batch file."

Now that's unfair because telnet is supposed to work. Well the good part which microsoft has done with Windows Server 2008 is that they have given everything but its disabled. So to fix it you need to go to Server Manager -> Features -> Add Feature. Select the Telnet client in the wizard which comes up and you are good to go.