Thursday, October 28, 2010

Create CRM Plugin in CRM 2011

Here is an example of creating Plugin Dll for Microsoft Dynamics CRM 2011.
Microsoft has changed the Plugin Dll code, more options to register between CRM 4 and CRM 2011.
1.       Create Dll from type class library.
















2. Write Code for Plugin like this example. in my example when update contact create a new task.
  need to  add key  ( Sign this assembly - because the option to put the dll in GAC )























3. Open Plug in Registration and insert the next parameters
Label: free text. In usual i give label like organization name to prevent mistakes
Discovery URL: http://localhost:5555/XRMServices/2011/Discovery.svc
User name: Deployment admin.































4. Register the Dll

 5. Register Step I in my example the event is Update for Contact Entity)

6. Update Contact:



 7. Result: Create Task successed






Enjoy,
Rami Heleg

Wednesday, October 27, 2010

Failed to open Deployment Admin - Deployment admin Crushed and get error message

Failed to open Deployment Admin - Deployment admin Crushed and get error message.
I tried to open a few times the Deployment Admin includes after restart and every time the screen crushed.

The error message which I got is:
Microsoft.CRM.Tools.Admin.DMSnapin, version= 5.0.0.0... Failed to load assembly when open Deployment manager

I Installed CRM 2011 in Windows server 2008 R 2. because this windows version the solution is to run Deployment manager as Admin (Right click and press “Run as Admin”)
http://social.microsoft.com/Forums/en/crm2011beta/thread/11edc393-2fce-48bf-b8b4-609b812c771c

To prevent from running each time as Admin make the next steps
1. To go start Run and press “msconfig”

2. System Configuration apprear. Select Tab Tools



3.

Select Change UAC Setting and press Launch.

















4.

Change the Progress to Never Notify.






5.
  Save the form and restart the server and From this current time don't must run Process and Administrator.


Thanks,
Rami Heleg,

Monday, October 25, 2010

Web Resource manager in Microsoft Dynamics CRM 2011

You'll find a lot of flexibility while managing code Resources(such as JS,CSS,XAP etc) at Microsoft Dynamics CRM 2011.
Adding a Java script code in CRM 2011 is quite simple however, when it comes to complex projects combining several team members I find it inefficient for example:
The single developer is required to update & publish the code on his CRM-form back & forth without the ability to debug his code along the way.
This intuitiveness will serve well a single developer or a very small team.

The following example will demonstrate how to add a JS code to the contact form:
1.      Create  Java script file names contact.js














Copy the next code to your file
function formOnLoad(){
            alert(‘onLoad’);
}

function formOnSave(){
            alert(‘onSave’);
}

2.      Select in nav bar the defualt solution.








3.      Select Web resource. From this place can be add the files which CRM support to load.







4. Add Java script file to solution.













5.  Default solution contains a new web resource from JS type









6.      Adding Java Script resource to Contact Entity.
Select in solution entities - > contact - > Forms














7.      Select Main Form and press double click for editing











8.      Press Form Properties to attach JS file  + function to form












9.      Open Form Properties section Form Libraries to link between web resource to Contact Entity













10.  Link between Web resources to Contact. CRM allow adding more the one file.

















11. Attach event between Contact entity events onLoad + onSave to custom JS














 







12. Publish the changes and open Contact Form.
In onload get custom alert + in saved mode get custom alert




























   13. CRM Save the Web resource template in table: WebresourceBase.

Thanks,
Rami Heleg

Saturday, October 23, 2010

Audit entities in CRM 5

System logs are designed to track the changes made to the data.

1. Who made the change
2. When change has been made and always follow up.

Obviously performing system logs for all the entitied make bad performance and database grow.


How to Audit in Dynamics CRM 2011:

Open system settings and select  “Start Auditing”













 Select in which entities use audit in my example I add the option to audit to incident entity













Press in check box to audit entity.










 CRM 5.0 allows defining fields for audit in field Tab but by default all fields in truck
Open incident and change the title









Select audit in nav Bar and see the result









CRM 5 gives to define after X time deletes old record.
 CRM save the audit changes in table AuditBase. CRM save only the old values in this table because the current value in the current object.










The Disadvantage is that all the audit records in the same table.
I think better option is to define for each entity another entity for the log.


Thanks,
Rami Heleg

Saturday, October 16, 2010

Requirements to install Microsoft Dynamics CRM 5.0

Hi,


What are the previews requirements to install Microsoft Dynamics CRM 5.0/2011
1.       Server must to Windows Server 2008 R2.
2.       SQL Server must be 2008 includes Reporting services
3.       All definition in AD
Link to install CRM 5.0 Beta:
Download Dynamics CRM 5.0 Beta

By the way CRM 5.0 must be installed in server 64 bit. Because of that cannot be installing CRM 5.0 in VPC  only in VMware
Thanks,
Rami Heleg