Monday, 7 May 2012

Restore deleted records in crm

I deleted by mistake some records on crm on my personal practise crm 4.0.

I then logged on to the database blah_MSCRM

and ran my sql query

SELECT * FROM
Account

where deletionstatecode=2
_____________________________________

update Account

set deletionstatecode= 0 --this will make your records to be deactivated but showing in crm

where deletionstatecode = 2

an error occurred when the workflow was being created. try to save the workflow again

So I got this Error after adding my custom activity to my workflow and tried publishing:

An error occurred when the workflow was being created. Try to save the workflow again.


I tried everything:

Roll ups and editing web.config but no help. My other Workflows worked fine, to me that meant my new custom workflow is up to shebert...


Please check:

My class and namespace was SendEmailActivity :

Changing my Namespace to XXXX.SendEmailActivity

This fixed it:

Not sure if it was because the two (nmsp and class) are the same or because Starndard CRM clushes with these.

Name things properly


Tuesday, 24 April 2012

CRM 2011 hiding one related link from entity left nav "Documents", "Campaign"

This Javascript hides one related link

function hideNavItem(navItem) {
     Xrm.Page.ui.navigation.items.forEach(function (item, index) {
         var itemLabel = item.getLabel();
         if (itemLabel == navItem) {
             item.setVisible(false);
         }
     });
 }

hideNavItem("Relationships");


You can hide Activities by:

hideNavItem("Activities");

Crm 2011 hiding Sales. Markerting, Common Nav Group in Entity left nav

This javascript hides the Sales Nav Group under Related left nav on CRM 2011 Entity

//Hides Nav Group inside a crm 2011 enitity

function hideNavGroup(navigationName) {
    var navItems = document.getElementById("crmFormNavSubareas");
    for (i = 0; i < navItems.childNodes.length; i++) {
        var navItem = navItems.childNodes.item(i);
       var itemName = navItem.firstChild.lastChild.innerText;
        if (itemName == navigationName ) {
   navItem.style.display = "none"
        }
    }
}

Consumption:

hideNavGroup("Sales");

The Sales group is removed,


You Can hide Service by:

hideNavGroup("Services");



Friday, 20 April 2012

To follow : Telerik Controls + Ajax + Crm 2011 + SharePoint 2010

This is to follow soon with screenshots

Tools: CRM Entity Comparer -EntityComparer

I have had to write a tool that will compare same entity on two environments - long story cut short - there are multiple environments which are not really supposed to be the same  but branch off one same environment - Diff client - Diff Requirements, same solution - This means importing customizations is not an option - if you have money for multiple servers to monitor all, good for you

This works on All Dynamics CRM versions - this means you can copy attributes from entity 1 of crm 2011  to entity1 of crm 3.0/4.0

This also works on different domains - option of using same credentials for both environments or two different sets

You also have the option to create the attribute or leave it out







- This will be shared on codeplex soon
- Link To folow Or request on kgopotso.riba@gmail.com

Andriod Apps using C# + Visual Studio

I recently picked up a habit of building Android Application using C# and Visual Studio as I an quiet comfortable with the language and IDE

I use Mono for Android plugin : read more: http://xamarin.com/monoforandroid

It has been really fun I must say, so much planned around, will also be integrating the android app I am building with CRM 2011

Quick things to share:

The GUI is build through an Xml markup called AXML - this is andriod's version of  xaml (Xaml is a markup used on Microsoft's WPF, Silverlight and Windows Phone 7(Mango) GUIs)

Android Controls are called Views

e.g

Android Textbox = EditView
Android Label = TextView
Button = Button
Spinner = Dropdownbox

For example this AXML


below produces a UI like the one below



And Yes the Code is C# - it uses a WCF Service call to login the user 



This is fun, I might be uploading this on Code Project - just look and listen