Wednesday, April 25, 2012

Help Me Get A Microsoft Dynamics CRM 2011 Session Into the Minnesota Developers Conference This Year

Please vote for my session by clicking on the link below and then clicking like on the bottom of the page from your Facebook account.  The votes will help me get my session in the Minnesota Developers Conference this year.  Last year it was rejected.

http://mdcsessions.ilmservice.com/Home/Details/28

Thanks

-

Tuesday, April 24, 2012

How To Create a One-To Many Relationship Between Two Entities in Microsoft Dynamics CRM 2011 Using VB.NET

This illustration shows how to create a one-to-many relationship between two entities in Microsoft Dynamics CRM 2011 in code in VB.NET  using the CreateOneToManyRequest.

Ok, here is what the code look like!
In VB.NET:

Dim req As New CreateOneToManyRequest()
req.OneToManyRelationship = New OneToManyRelationshipMetadata()
req.OneToManyRelationship.ReferencedEntity = "account"
req.OneToManyRelationship.ReferencingEntity = "contact"
req.OneToManyRelationship.SchemaName = "new_account_contact"

req.OneToManyRelationship.AssociatedMenuConfiguration = New AssociatedMenuConfiguration()
req.OneToManyRelationship.AssociatedMenuConfiguration.Behavior = AssociatedMenuBehavior.UseLabel
req.OneToManyRelationship.AssociatedMenuConfiguration.Group = AssociatedMenuGroup.Details
req.OneToManyRelationship.AssociatedMenuConfiguration.Label = New Label("Account", 1033)
req.OneToManyRelationship.AssociatedMenuConfiguration.Order = 10000

req.OneToManyRelationship.CascadeConfiguration = New CascadeConfiguration()
req.OneToManyRelationship.CascadeConfiguration.Delete = CascadeType.RemoveLink
req.OneToManyRelationship.CascadeConfiguration.Merge = CascadeType.NoCascade
req.OneToManyRelationship.CascadeConfiguration.Assign = CascadeType.NoCascade
req.OneToManyRelationship.CascadeConfiguration.Reparent = CascadeType.NoCascade
req.OneToManyRelationship.CascadeConfiguration.Share = CascadeType.NoCascade
req.OneToManyRelationship.CascadeConfiguration.Unshare = CascadeType.NoCascade

req.Lookup = New LookupAttributeMetadata()
req.Lookup.SchemaName = "new_parent_accountid"
req.Lookup.DisplayName = New Label("Account Lookup", 1033)
req.Lookup.RequiredLevel = New AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None)
req.Lookup.Description = New Label("Sample Lookup", 1033)

Dim resp As CreateOneToManyResponse = DirectCast(service.Execute(req), CreateOneToManyResponse)



Thats all there is to it!

I hope this helps!

Monday, April 23, 2012

Delete a Relationship Between Entity Types in Microsoft Dynamics CRM 2011 Using VB.NET

This illustration shows how to delete an existing relationship between two entities in Microsoft Dynamics CRM 2011 in code in VB.NET  using the DeleteRelationshipRequest.  

Ok, here is what the code look like!
In VB.NET:

Dim req As New DeleteRelationshipRequest()
req.Name = "new_contact_account"
Dim resp As DeleteRelationshipResponse = DirectCast(slos.Execute(req), DeleteRelationshipResponse)



I hope this helps!

-

Thursday, April 19, 2012

Retrieve Used Resources for an Organization and Storage Quota Info in Microsoft Dynamics CRM 2011 Using VB.NET

This illustration shows how to retrieve used resources for an organization like number of custom entities and storage quota information in Microsoft Dynamics CRM 2011 with RetrieveOrganizationResourcesRequest.   This example will be given in VB.NET
    Ok, here is what the code looks like!
    In VB.NET:

    Dim req As New RetrieveOrganizationResourcesRequest
    Dim resp As RetrieveOrganizationResourcesResponse = DirectCast(slos.Execute(req), RetrieveOrganizationResourcesResponse)
    
    

    This will provide information like:

    - Number of Active Users
    - Number of Custom Entities
    - Number of Non-Interactive Users
    - Number of Published Workflows
    - Current Storage (in Megabytes)

    It will also provide quota information like:

    - Max Number of Active Users
    - Max Number of Custom Entities
    - Max Number of Non-Interactive Users
    - Max Number of Published Workflows
    - Max Storage ( in Megabytes)

    - There you go!

    Tuesday, April 17, 2012

    Opportunity Partners Named as One of the Top 100 Places to Work in Minnesota!

    Opportunity Partners, in the Twin Cities has been named as one of the TOP 100 places to work in Minnesota.  They are a wonderful company that helps many people with disabilities and the elderly.

    Read the article: http://minnesotabusiness.com/blog/minnesota-business-announces-best-100-companies-work

    Congrats!!  Currently Sogeti USA (my company) is implementing Microsoft Dynamics CRM 2011 for them in conjunction with the Careworks CareDirector ISV solution.  I am sure this company will grow to new heights in the future with CRM.

    Sunday, April 15, 2012

    Assign an Entity to a User in Microsoft Dynamics CRM 2011 Using VB.NET

    This illustration shows you how to assign an entity to a user using VB.NET with the Assign Request message against the CRM 2011 organization service.
    VB.NET:

    Dim req As New AssignRequest()
    'entity you want to assign
    'used string for entity logical name to show that this would work for a custom entity easily by specifying schema name for entity
    req.Target = New EntityReference("account", New Guid("73800742-6C87-E111-9A1E-78E7D162EE70"))
    'Team or user you want to assign it to
    req.Assignee = New EntityReference(SystemUser.EntityLogicalName, New Guid("9106AB02-0879-E111-BB66-78E7D162DEDB"))
    service.Execute(req)
    
    


    Thats all there is to it!

    I hope this helps!

    Tuesday, April 10, 2012

    Support for Windows XP and Office 2003 Will End as of April 8th, 2014

    As of April 8th, 2014, it appears that support for Microsoft Office 2003 will end along with support for Microsoft Windows XP.  It's been a long run and a lot of people and businesses are still using these platforms, but it is keeping in alignment with Microsoft's 10 year commitment minimum  to support it's products.  

    This means no more updates for XP also.  I know this is welcome to some people and I know that I have been burned by the forced restart updates in windows before, but seriously, it's time to find a new platform.  XP has only been around for almost 12 years.  It's a testament to the greatness of the product, but really, it is way overdue to switch.

    If you are working with these platforms yet, as I know a lot of you are, I suggest starting to formulate your migration plans now, or at least start to NOW!!

    More info here:

    Wednesday, April 4, 2012

    Retrieve Metadata for an Entity in Microsoft Dynamics CRM 2011 Using VB.NET

    This illustration shows you how to retrieve metadata for an entity using VB.NET with the RetrieveEntityRequest message against the CRM 2011 organization service.
    VB.NET:

    Dim req As New RetrieveEntityRequest
    req.EntityFilters = EntityFilters.All
    req.LogicalName = "account"
    
    Dim resp As RetrieveEntityResponse = DirectCast(slos.Execute(req), RetrieveEntityResponse)
    
    


    It is important to note that you can filter on the type of entity metadata you want returned since the returned XML document will be very large if you choose EntityFilters.All as shown above.  Your choices are All, Attributes, Default, Entity, Privileges, and Relationships.



    Thats all there is to it!

    I hope this helps!

    Monday, April 2, 2012

    Create a New Entity in Microsoft Dynamics CRM 2011 Using VB.NET

    This illustration will show you how to create a new entity in Microsoft Dynamics CRM 2011 using VB.NET to invoke CreateEntityRequest.

    Ok, here is what the code looks like once your service is instantiated!

    In VB.NET

    Dim attribute As New StringAttributeMetadata
    attribute.SchemaName = "new_stringattribute"
    attribute.DisplayName = New Label("sample string  attribute", 1033)
    attribute.RequiredLevel = New AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None)
    attribute.Description = New Label("string attribute", 1033)
    attribute.MaxLength = 100
    
    Dim entity As New EntityMetadata
    entity.SchemaName = "new_vbtest"
    entity.DisplayName = New Label("vbtest", 1033)
    entity.DisplayCollectionName = New Label("new vbtest entity", 1033)
    entity.Description = New Label("our spiffy new entity we made in vb.net that doesn't really do anything", 1033)
    entity.OwnershipType = OwnershipTypes.OrganizationOwned
    entity.IsActivity = False
    
    Dim req As New CreateEntityRequest
    req.Entity = entity
    req.PrimaryAttribute = attribute
    Dim resp As CreateEntityResponse = DirectCast(service.Execute(req), CreateEntityResponse)
    
    

    Thats all there is to it!
    -