Saturday, February 21, 2009

How to disable hibernation in Vista

Hibernation is a feature introduced in Windows 2000 and later in Windows XP which allows your computer to enter a sort of "deep sleep" mode - your computer's state is preserved, and it uses far less power than if you just put your computer into Standby mode. But in order to enable your system to Hibernate, Windows reserves a hidden file (c:\hiberfil.sys) which is roughly equal in size to the amount of RAM your system has. Hence if you have 2GB of RAM in your system, then you'll have a corresponding hiberfil.sys file which is roughly 2GB in size. This is perfectly fine and harmless if you plan on using the Hibernation feature and you have plenty of hard disk space to spare. On my desktop machine, however, I don't plan on using the Hibernation feature (since this system is always on as a server/workstation) and my drive space is at a premium.

Disabling the Hibernation feature in Windows XP was fairly straightforward using the Power Options in the Control Panel. It's a bit trickier in Windows Vista, though, since there's no graphical way of disabling this via the Control Panel. (Or if there is, I certainly didn't find it!)

In Windows XP you can disable hibernation by doing the following:
1. Open Power Options in Control Panel
2. Select the Hibernate tab
3. Clear the checkbox for enabling hibernation

In Windows Vista, it is easy enough to disable via the command line as follows:
1. Click Start (or the Windows Logo) -> All Programs -> Accessories.
2. In this folder you will see an entry labeled Command Prompt. Right-click this entry and select "Run as administrator."
3. At the command prompt, type "powercfg -h off" (without the quotes) and press Enter.

Unfortunately there's no confirmation message to indicate whether or not you were successful. But we can confirm this for ourselves by typing "dir /a:h c:\hiberfil.sys" (again, without the quotes) and pressing Enter.
If we were successful then you should get a message which says "File Not Found."
That's it We have just disabled Hibernation and freed up some disk space. But if you decide that you want to enable Hibernation later you can do so by following steps 1-3 again, but this time specify "on" instead of "off" during step 3.

Note: If you get a User Account Control dialog during any of the above steps you can simply click Continue.

Friday, February 20, 2009

Windows XP mouse Snap To

Enable the Microsoft Window XP mouse Snap To feature to automatically focus on dialog box buttons. Enabling this feature will automatically move your mouse cursor to the default button on any dialog box that appears on Windows. This is a great way to save a little time and not have to move you mouse cursor to the "Ok" button each time a dialog box appears. To enable this feature follow the below steps.

1. Click Start, Settings, Control Panel.
2. Double-click the Mouse icon
3. In the Mouse Properties window click the Pointer Options tab and check the "Automatically move pointer to the default button in a dialog box" option.

Create desktop shortcuts to your favorite web pages

Easily create Windows desktop shortcuts to your favorite web pages by following the below steps.

1. Open the web page you wish to create a shortcut for.
2. Resize your browser window so it's not maximized.
3. Once in a window mode click the icon to the left of the Internet address in the address bar and drag it to your desktop and let go to create a shortcut.

Tuesday, February 17, 2009

Microsoft .NET platform


CategoryTechnologies
Application InfrastructureCommon Language Runtime (CLR)
.NET Framework
Mobile.NET Compact Framework
ASP.NET Mobile
Silverlight Mobile Web
WebASP.NET
Rich Internet Application (RIA)Microsoft Silverlight
Rich ClientWindows Forms
Windows Presentation Foundation (WPF)
ServicesASP.NET Web Services (ASMX)
Windows Communication Foundation (WCF)
Collaboration / Integration / WorkflowWindows Workflow Foundation (WF)
Microsoft Office SharePoint Server (MOSS)
Microsoft BizTalk Server
Web ServerInternet Information Services (IIS)
Database ServerMicrosoft SQL Server

Monday, February 9, 2009

Backup data using WinRAR

WinRAR has become a standard for compression of data. This program has a core utility running on its back, that is the Rar.exe file, this is the executable program running behind the user interface. This file can be easily located in its installation directoty like:

C:\Program Files\WinRAR\

In this directory you will also find a Rar.txt file, this file contains all the command options Rar.exe program takes to perform different operations.

I developed a routine to backup my data using it as follows:

1. We create a text file named "mybackup.txt", in this file we enter all the directories or files for which backup is required. This file is filled as follows:

C:\Documents and Settings\<User Name>\My Documents\
C:\Documents and Settings\<User Name>\Desktop\

And save this text file in the same directory where Rar.exe program is located, i am doing this to avoid path errors.

2. We create a batch file, in this file we will call the Rar.exe program and pass it required parameters to backup my data as follows:

rar.exe -r u D:\mybackup.rar @mybackup.txt

[-r]
This indicates that all files and sub directories should be included

[u]
This indicates to update archive, if archive mybackup.rar already exists than update files in it and add new files

[D:\mybackup.rar]
This is the location and name of archive file

[@mybackup.txt]
This is the name of list file from which Rar.exe program will find directories and files you want to backup

We will save this batch file it the same location where Rar.exe program is located.

That’s all the backup routine using WinRar is ready, the best part of this backup routine is its ability to check a file if it has been modified, if a file is modified than and only than it is added to archive, this reduces overall backup time for subsequent backups. The backup routine will take time when executed first time, after that all subsequent backup operations will be faster as it will backup only modified files.

Saturday, February 7, 2009

Microsoft CRM 4.0 Part - IV

Contact:
"Contacts" are records of individual customers; they can be related to another account or customer as well. A contact can optionally have a parent customer; this parent customer can be either Account or Contact

Account:
"Accounts" are records of company customers; Account can optionally have parent account and primary contact separately,

Leads:
"Leads" are potential customers or contacts, these are contacts which are not our customer but have potential to be a one in future. Marketing team works on these potential customers by running campaigns to introduce their product or company them.
1. If qualify lead can be converted into Account, Contact and Opportunity
2. If don’t qualify lead is either Lost, Cannot contact, No longer interested or Canceled, this is disqualified status

Opportunity:
As per SDK "This entity represents a potential revenue-generating event, or sale to an account, that has to be tracked through a sales process to completion."
Each opportunity belongs to a contact or account, this is a potential sale which can occur, a customer is expected to buy these products, we call it an sales opportunity

We can create quote, order or invoice direct from opportunity

Email, fax, phone call, letter and appointment activities can be converted to opportunities by providing customer (Account or Contact) and source campaign; optionally we can record a campaign response during this conversion.

Campaign:
Campaign is a collection of marketing activities which target list of accounts, leads and contacts. These lists are marketing lists and are available in marketing section of CRM. Purpose of a campaign is to market business or product of the company, to who we market our product or business? The answer comes from marketing lists; before we can execute our campaign we need marketing lists or target persons.

Marketing List:
These are list of accounts, contacts or leads which are used for campaigns and marketing. Marketing lists are added campaigns,

Marketing List Members:
Following entities can be member of marketing list; these are Lead, Contact and Account. Marketing list can have only one type of member either lead, contact or account

Campaign Planning Tasks:
These are set of notes or information which will be needed to run a campaign, set of instructions or high level planned words of senior marketing team, these are maintained to direct marketing team in running a campaign successfully, obviously these are planned prior to launching a campaign.

Campaign Activities:
Campaign activity also follows the abstract of activity model; a campaign activity can be email, phone, appointment, letter, etc. These are executing points of a campaign, another term used with them is "Distributed" or "Undistributed", means the activity has been executed or not. Each campaign activity can have marketing lists from the campaign only, we can add these lists manually or automatically when adding marketing list to campaign, a dialog usually asks whether to add this to undistributed activities.

Campaign Responses:
These are response of campaign received from customers (Accounts or Contacts), this can be a interest shown by customer or not interested response, when a response is received it will have to be recorded into the system by opening the response activity which can be a email, fax, etc and convert that to opportunity, opportunities are what we get in response to a campaign.

Campaign Target Products:
List of products which are being marketed, existing products can be added

Campaign Target Marketing Lists:
Already created/existing marketing lists can be added as target marketing list into a campaign; this list of members is than used for campaign activities like email of advertisement, etc

Campaign Related Campaigns:
List of campaigns related to each other, we can one campaign as related campaign into another campaign

Quick Campaigns:
Quick campaigns can be created on Leads, Accounts and Contacts.

1. Simply go to Accounts screen and select a set of accounts
2. Now click Create Quick Campaign and select "For selected records", this start a wizard to create a quick campaign for selected accounts
3. Enter name for quick campaign
4. Select type of campaign activity to create, quick campaign can have only one type of activity, it can be email, letter, fax, etc
5. Select owner for these newly created activities, we can take ownership our self or the owners of the records included in the quick campaign or assign to another user or queue
6. Next a template will provided to fill out, this template will depend on the type of activity you selected, I selected email therefore an email sending form is shown, fill in the fields
7. When done click next, final step is to create the activities from this quick campaign, click Create. This will create activities of Draft status; we can now see these activities in our work place.
8. We can relocate our quick campaign from Sales or Marketing section and see its status; it will show total members, number of success, number of failures, and status reason.


Microsoft Dynamics CRM Concepts, Terminology and Navigation:
Reference: https://www.microsoftelearning.com/samples/mbscrm1/framework/index.htm

General:
· Accounts: Manage accounts, which are companies that your organization does business with.
· Contacts: Manage contacts, which represent the customer, potential customer, or individuals related to an account.
· Notes: Track details and attach files to record types. A single record can have one or more notes attached to it.
· Activities: Track all interactions regarding a record in the system. Activities track e-mails, phone calls, appointments, tasks, and more

Sales:
· Leads: Manage possible customers who must be qualified or disqualified as sales opportunities. If a lead is qualified, it can be converted to an opportunity, account, and/or contact for additional tracking.
· Opportunities: Manage potential sales to a customer and track them through the sales process.
· Quotes: Manage the formal offers for products or services, proposed at specific prices and the related payment term. Quotes can be sent to an opportunity, account, or contact.
· Orders: Manage confirmed requests for the delivery of goods or services based on specified terms. An order is a quote that has been accepted by a customer.
· Invoices: Manage invoices orders that have been billed. Invoices record a sale to a customer, including details about the products or services purchased.

Marketing:
· Campaigns: Allows you to create marketing programs that use communication vehicles (such as e-mail, advertisements and direct mail) to accomplish specific results in a specific timeframe, such as introducing new products.
· Marketing Lists: Allows you to create lists of accounts, contacts, or leads that match specific set of criteria. You can use marketing lists for marketing campaigns or to do target sales work.
· Competitors: Allows you to track competitors, which are other businesses or entities that might compete with your organization for sales opportunities.
· Sales Literature: Allows you to store sales literature such as brochures and collateral in the system.
· Products: Allows you to manage your catalog of available products, the items or services that the organization sells or provides. Products can be linked to other records, such as quotes, campaigns, and cases.

Service:
· Contracts: Allows you to manage contracts, which are agreements to provide support during specified coverage dates or for a specified number of cases or for a specified length of time.
· Services: Allows you to manage services, which are work performed for a customer by one or more resources. Microsoft Dynamics CRM facilitates the scheduling of services and the resources required.
· Cases: Allows you to track cases, which are customer service issues or problems reported by a customer. Cases track the activities that customer service representatives use to resolve the issue.
· Knowledge Base: Allows you to manage and work with the Knowledge Base, which is a repository of articles of importance to your personnel and customers. The Knowledge Base lets you draft, submit, review, and publish articles such as FAQ's, trouble-shooting information, and so on.


Other reference material:
http://crm.dynamics.com/crm_training_and_support/microsoft_crm_training/index.html
http://rc.crm.dynamics.com/rc/regcont/en_us/onlinedefault.aspx

11 Things to know about customization
http://rc.crm.dynamics.com/rc/regcont/en_us/Live/articles/thingstoknowaboutcustomization.aspx

Workflow customization
http://rc.crm.dynamics.com/rc/regcont/en_us/Live/articles/8-workflowcustomization.aspx

Microsoft CRM 4.0 Part - III

Activity Model:
Activity is an abstraction, which can be of any type in CRM. Activity is a user entity; it is performed by a user, assigned to a user or shared with users. We have parties involved in an activity, information of how the activities participated in the activity and optionally entity regarding which this activity is. Activity, participants, participation type, regarding entity

Primary Activities:
E-mail, Fax, Letter, Phone call, Task

Related Activities:
E-mail template, E-mail attachment, Activity party, Mail merge template Other Activity Entities: Appointment, Service appointment, Campaign, Campaign response, Case resolution, close, Order close and Quote close

Workflow execution is supported on following activity types:
E-mail, Phone call, Fax, Letter, Task, Appointment, Service appointment
“All entities that are related to an activity have there own states and are managed by system itself like a an email becomes Sending when email router picks an email for send process and is set to sent when email is successfully sent”

Relation of Activity with an Entity:
Every activity is related to some entity, Email is an entity if we have a email activity that means the system has a activity which is related to email, activity it self is an entity and resides separately in the system.
Example: Activity has one-to-one relation with email

MetaDataSchema.Entity:
This is the table in database which contains data of all entities in the CRM, the GUID, ObjectTypeCode and all other information is available here.
SELECT * FROM MetaDataSchema.Entity

Creating Simple Email Activity:
1. Go to CRM using web client
2. Now select My Work Place and click “Activities” under “My Work”
3. When “New” is clicked a list of activities are shown which can be created, the list contains “Task, Fax, Phone call, Email, Letter, Appointment, Service activity and Campaign response”. We will select an email
4. This is show a standard email composing form, here user will specify From, To, CC, BCC, Subject, Body, Attachment, etc
5. by default from contains the user name of currently logged in user, although if a user has rights he can change that to another user
6. We select a contact in To and enter subject and body text
7. Email can be sent to account, contact, lead, queue and user
8. There is also a field of regarding; this is used to specify a entity about which this email activity will be created, like I have to sent an email to the customer regarding his pending invoice, so I will select that invoice in regarding. Only one entity can be selected in regarding.
9. we can either Save and close this activity or Send, if click Send the activity is saved and send at once, if we only save at this point that we can send this email later from activities section
10. We will save this email activity and close
11. On the activities screen, I will select email in “Type” dropdown, this will show my emails, the email at this point is being shown in “Draft” status, this means I can still edit this email and send
12. If I send this email, the status now shows “Pending send”, it remains in this status until picked by email router; email router will set its status to “Sending” and will remain “Sending” unless it is sent or failed.

Friday, February 6, 2009

Microsoft CRM 4.0 Part - II

ISV (Independent Software Vendor):
These are companies which either makes software or sell software products, Microsoft CRM provides complete customization kit and SDK for ISVs to build and customize the CRM package according to the requirements of a client. Also ISV themselves can have a CRM server and host multiple organizations for different clients on one CRM server; this is a new feature of multi tenant in CRM 4.

ISV Configuration:
How ISV will add its custom components to the CRM? In previous version there was an XML file named “ISV.config” available for ISV to add custom components, the file was located on CRM server in “<web>\_Resources” folder, whereas in CRM 4 the same file is used but this time it is saved in database rather than file system, why it has been stored in database? We will see that next. The “ISV.config” file is used to customize following:

1. Area labels in left navigation pane in forms
2. Main global menu
3. Goto and Help menu
4. Application level toolbar
5. Custom menu on CRM entities

“ISV.config file is different for each organization”

Why ISV.Config stored in database?
As we know that CRM 4 has been introduced with multi tenant feature, if we save the ISV.config file in file system it would be difficult to manage config files of different tenants in file system, in CRM 4 a separate database catalog is created for each organization, that is why all customization configuration files are also stored inside database, we have another file of site map as well which is used to customize application navigation.

In this file we can define different menu options and also configure which menu its is shown on which client, we have three clients for CRM “Web”, “Outlook” and “Outlook offline”; therefore we can show one menu item on Web but not in outlook, etc

Customize ISV.Config or SiteMap.xml using CRM XML Editor:
This is another tool from Patrick; this program can simplify the process of editing and publishing the “ISV.config” and “SiteMap.xml”, this is a one window operation and can prove to be useful in customizing these areas quickly

Reference:http://www.patrickverbeeten.com/pages/TechnicalNet/MicrosoftCrm/CrmXmlEditor.aspx?id=20

How to customize ISV.Config or SiteMap.xml?
The CRM way is to export the ISV.config file from CRM, modify that and import into CRM, for this we will use web client to connect with CRM and do as follows:

1. Open CRM site and select “Settings”
2. Select “Customization” and click “Export customization”
3. From the view dropdown select “Client Extensions”
4. This will list two configuration files “ISV.config” and “SiteMap.xml”
5. Select “ISV.config” and click “Export selected customizations”, a information dialog is shown click OK to continue
6. A file download dialog is shown, click “Save”, and locate the location where to save this file, a (customization. zip) is created
7. Unzip this file will give “customization.xml”
8. Now customize this file and when done use import feature to publish these changes to CRM

What is “customization.xml”?
This is a way of exporting all customizations from CRM and is than used to deploy them on another CRM server or organization, this single configuration file have hold all customizations of CRM from entities, forms, to ISV.config, SiteMap.xml, that is all customizations.

How to enable the ISV.Config?
By default the customizations of this file are not visible, administrator will have enable them himself so these customizations will appear on the forms and navigation areas. This is done as follows:

1. Open CRM site using web client
2. Select “Settings” and click “Administration”
3. Here you will find “System settings”, click that to open in another window
4. Now select “Customization” tab, here you will see area for ISV, click the ellipsis (…) button
5. This will show list of clients for which the ISV.config customization is visible, we have three options here “Outlook”, “Outlook offline”, “Web Application”
6. We select “Web Application” for this time and click OK, now reload your page to view customized menus

Passing Parameters to a URL using ISV.Config:

There are two ways to pass parameters to a URL using ISV.Config.
1. Use the PassParams attribute.
2. Use a querystring parameter within the URL.

Passing parameters to the target URL using the PassParams attribute provides information to the target application about the context of the record . All the parameters are passed if the Button element, the MenuItem element, or the NavBarItem element is configured by using the PassParams attribute.

You can indicate whether a Button, MenuItem, or NavBarItem passes the parameters listed in the following table.

TypeEntity Type CodeAn integer that uniquely identifies the entity.
idObject GUIDThe GUID that represents a record.
orgnameOrganization NameThe unique name of the organization.
userlcidUser Language CodeThe language code identifier that is used by the current user.
orglcidOrganization Language CodeThe language code identifier that represents the base language for the organization.

Language codes are a four digit Locale ID. Valid Locale ID values can be found at http://msdn2.microsoft.com/en-us/library/0h88fahh.aspx.

Example:
Without parameters:
http://myserver/mypage.aspx

With parameters:
http://myserver/mypage.aspx?orgname=AdventureWorksCycle&userlcid=1033&orglcid=1033&type=1&typename=account&id=%7BDBD5DBFB-0666-DC11-A5D9-0003FF9CE217%7D

Use a QueryString parameter within the URL:
You can include a QueryString parameter within the URL attribute. This can be particularly useful if you want the Button, MenuItem, or NavBarItem to open a specific Microsoft Dynamics CRM record or view using URL Addressable Forms and Views.

Note:
1. It is best to use the entity name instead of the entity type code because the entity type code may be different between Microsoft Dynamics CRM installations.
2. You will not be able to import the ISV.Config if the URL includes the ampersand (&) character used to separate multiple QueryString parameters in the URL. This character makes the XML invalid. You must escape the ampersand character in the URL attribute value with "&".

Reading Passed Parameters:
Passed parameters are usually read in the target (.aspx) page by using the HttpRequest.QueryString property.

PrependOrgName Function:
Prepends the organization name to the specified path,

Usage: prependOrgName (sPath)

Parameters: sPath
A String that contains a relative URL to a custom aspx page in the ISV folder of the Microsoft Dynamics CRM Web site

Returns: A String that contains the complete URL

Remarks: The string that is returned uses the following format:
var url = "/"+ORG_UNIQUE_NAME+sPath;

Example: var url = prependOrgName("/isv/app/myapp.aspx");

Automating CRM Invoice:
We have a client which needs an automated feature of making invoice out of quote. The user will enter a quote and an invoice is generated automatically

First we should know the process of how a quote will become an invoice; following are the stages between a quote and an invoice:

1. A new quote is created and is activated, its status is changed to active
2. Now we can “Revise” the quote or “Close the quote”
3. If a quote is Activated, it cannot be changed or modified, to modify a quote we will have to change its status to revise
4. Once revision is done the quote is activated again
5. Orders can be generated for a quote when a quote is activated, if a quote is closed no orders can be generated for it
6. If we need to reuse a closed quote, we will have to revise it and activate again
7. Now next step is to create an order, before we can create an order we have to set the status to “won”, this indicates we have won the quote and now we are issuing an order
8. Now once the quote has been turned into order, it will no longer be visible in active quotes view,
9. The next step after generating an order is to either cancel an order or fulfill the order
10. If we cancel the order, we set the status to “No Money”, the order cannot not be activated again now, we will have to open the quote again and generate an order, of course we will again revise the quote and activate it
11. When ever a quote is revised another copy of the same quote is created and the original quote remains preserved in the system and the new quote gets a revision number which is a incremented number
12. Now we have again repeated previous steps to create a new order from the quote
13. Now if we select to “Fulfill” an order we can set following status, it is “Complete” or “Partial”, what ever status we set the next step will be to generate an invoice
14. Next we can either select “Cancel Invoice” or “Invoice Paid”
15. If we select “Invoice Paid” we will have to set either “Complete” or “Partial”
16. If we select “Cancel Invoice” we will have to set “Cancelled”

Quote to Invoice Cycle
Quote -> Activate -> Won or Quote -> Revise -> Activate -> Won
Than -> Order -> Fulfill (Complete or Partial) -> Invoice -> Paid (Complete or Partial)

We write a plug-in which on creation of a quote automates the process and generates the invoice. Our plug-in will work as follows:

1. Get the newly created quote by GUID
2. Create a SetStateQuoteRequest and set status of quote as “Active”
3. Create a WinQuoteRequest and set status of quote as “Won”
4. Create a ConvertQuoteToSalesOrderRequest and create new order from quote
5. Create a ConvertSalesOrderToInvoiceRequest and create new invoice from order
6. And this will conclude our goal

Microsoft CRM 4.0 Part - I

Businessunits:
Businessunits define work groups in any organization, each businessunit can have multiple users associated, having different access roles. We can also define child businessunits under each businessunit, by default when CRM is installed a default businessunit is created with the name of Organization. This is the parent businessunit, and cannot have a parent as well.

Child Businessunits:
We can also define child businessunits under each businessunit, child businessunits inherit access roles from parent businessunit, again any child business unit can have its own child businessunit. This model helps implement a real organization's heirarchy in the system.

What does Microsoft CRM offer to SME?
MSCRM is ideal for Small to Medium size organizations offering comprehensive features Sales, Services, Marketing & Reporting. It helps business users to access information in an efficient and quick manner. It supports customization of entities & featurs according to the business needs. Business processes can be implemented as workflows with less time to deploy and put to work.

Users and their ownership:
Each businessunit has its own set of users working in the organization, information inside organization belong to a specific user. This means that sale invoices creatred by a specific user are owned by the user itself and not explicity by user's businessunit. It is the user's ownership which implies logical ownership of sales invoices by user's business unit. If a user is moved to another business unit, any records associated to the user will automatically be owned by that business unit.

Ownership Importance:We can have a client which maintains two businessunits A and B, user X has been recently moved to businessunit B from A, what happened is all work performed by this user has been owned by business unit B. This is by design and can be a problem in a specific situation where it is needed to be addressed.

One solution can be to create a Default user to hold ownership of entities when a user is moved from one businessunit to another.

Write a plug-in or workflow which will transfer ownership of all entities to the default user on the event when business unit of a user is changed

Security and Access Levels:
Following security levels are available, None, User, Businessunit, Parent: Child Businessunit and Organization

None > Users will not have any access
User > User has access to only its own entities
Businessunit > User has access to entities inside his businessunit
Parent: Child Businessunit > User has access to entities in its own and child businessunits
Organization: User has access to all entities in whole organization even if a specific entity is in a parent businessunit
Security roles are used to maintain and apply security on user's type of access, level and entiy For example
Read, Create, Update, Delete is type of access,
Parent: Child Businessunit is level
Account, Contact, Lead are entities
Roles maintenance can be performed in Settings area which is nont available to non-adming users.

Custom Entities:
Custom entities are user defined with custom attributes, forms, views and relationships with other entities, Entity should not be created without entering proper description about the entity, this description is helpfull for others in future who deal with this entity, entity without description is just like code without comments. Descriptions avoid likely confusions as customizers can endup creating multiple attributes which serve the same purpose.

For each custom entity we define ownership, ownership can be user or organization:
User: Records for this entity can be owned by individual users. For example contact records are set to User
Organization: Records for this entity are used for reference by all Microsoft CRM users, and so are not owned by individual users. For example, product records are set to Organization.

Reference: http://blogs.infinite-x.net/2006/02/18/understanding-entity-ownership-in-mscrm-30/

Each custom entity has a primary attribute, by default its schemaname i.e, column name in db table is ‘Name’, we can modify the name of attribute at time of creating the entity, once entity is created the schemaname cannot be changed how ever we can change its display name.

Define areas where this entity will be displayed like sales, my work place, etc

Attributes of an Entity:
Each attribute has following properties, Name, Display Name, Type, Requirement level, searchable, IME mode, etc

These properties of attribute cannot be updated:
Name: this is the name by which the attribute is known in the CRM system, For custom attributes it is also prefixed with ‘new_’
Type: this is the data type of attribute like ‘nvarchar’

These properties of attribute can be updated:
Display Name: this is the name visible to users interacting with the entity like on forms, reports, etc
Requirement level: this is related to constraint of the attribute either it is a required field or not or is recommended
Searchable: to be able search on base of this attribute in your views or lookup screens
IME mode: how this field is displayed on form active, Inactive or disabled

Custom Entity Prefix and Postfix:
When a new custom entity is created, CRM creates metadata and two tables for this newly added entity one with postfix of ‘Base’ and other with ‘ExtensionBase’, both tables have prefix of ‘New_’

Reference: http://server/organization/sdk/list.aspx (for in-depth details of entities)

The postfix ‘Base’ indicates that this table contains core required attributes of CRM and postfix ‘ExtensionBase’ indicates any custom attributes added to this entity go in this table. All entities which are customizable will have two tables just like that, where all custom attributes go into the ‘ExtensionBase’ table.

There is also a tool available which provides extensive details of entities

Reference: Tool to view extensive details of CRM entities


Custom Relationship:
Relation ship between two entities can be one-to-many, many-to-one and many-to-many, some relations can be defined at time of creating the entity these are relation to note and activity entities.

“All custom relationships added are null able”

Database Query to view currently logged in user:
Below are core sql function used to join any SQL with a specific user, one provides id of current user where as other provides full name of currently logged in user, as CRM uses windows authentication mode of premises and active directory is required as well, any user accessing the CRM is a user of the organizations Windows domain

select suser_sid()
select suser_sname()

Differences in CRM 3.0 and CRM 4.0

1. Microsoft introduced multi tenant system in CRM 4.0, if an organization purchase Enterprise version of CRM 4.0, it can than create and manage multiple tenants that is multiple Organizations on single CRM hosting.
2. Earlier versions of CRM 4.0 did not have option to create many to many relation between entities, this caused some problem for organizations where this was a requirement, it is now available in CRM 4.0

Thursday, February 5, 2009

Logon Info and Parameter Value for Crystal reports

Imports Microsoft.VisualBasic
Imports System.Data.SqlClient
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine

Public Sub SetLogonInfo(ByRef objrpt As ReportDocument)

Dim connection As IConnectionInfo
Dim newServerName As String = "dbServer"
Dim newDatabaseName As String = "dbName"

Dim userID As String = "dbusername"
Dim password As String = "dbpassword"

' Change the server name and database in main reports

For Each connection In objrpt.DataSourceConnections
' SetConnection can also be used to set
' new logon and new database table
objrpt.DataSourceConnections(connection.ServerName, _
connection.DatabaseName).SetConnection( _
newServerName, newDatabaseName, userID, password)
Next

' Change the server name and database in subreports
Dim subreport As ReportDocument

For Each subreport In objrpt.Subreports

For Each connection In subreport.DataSourceConnections

' SetConnection can also be used to set
' new logon and new database table
subreport.DataSourceConnections(connection.ServerName, _
connection.DatabaseName).SetConnection( _
newServerName, newDatabaseName, userID, password)
Next

Next

End Sub


Public Sub SetParameterValue(ByRef objRPT As ReportDocument, _
ByVal parameterName As String, _
ByVal ParameterValue As String)

Dim parameterField As ParameterField

parameterField = objRPT.ParameterFields(parameterName)
parameterField.CurrentValues.AddValue(ParameterValue)
parameterField.HasCurrentValue = True

End Sub

Sunday, February 1, 2009

ASP.Net "Index was outside the bounds of the array" Publish Website Issue

With Visual Studio SP1 when they use the "Publish Website" command with a web project configured to use the built-in ASP.NET Development Web Server with a "/" as the virtual path encounter an "Index was outside the bounds of the array" error message during publishing:



This is a bug as regression in VS 2005 SP1, for this we a public hotfix for the issue that you can directly download here

Failed to access IIS metabase problem

When you install IIS AFTER .NET 2.0 framework, the rights of the ASPNET user had not been set correctly.

Repair (Uninstall if repair does not work for you) .NET Framework 2.0

Simply run the following from command line to reset the IIS registry settings for aspnet user. Usually framework directory for .Net Framework 2.0 resides under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i

Reference: http://support.microsoft.com/?kbid=267904

On Vista and VS 2005 check the shortcut to VS 2005, and make sure 'Run as Administrator' option is checked. If not check this option in Advance section.