Monday, 20 April 2015

SQL Server Business Intelligence Development Studio 2008

Hi,

Today, I was working on legacy project where SSIS packages were developed using 2008 Business intelligence. Somehow, I was not able to open the project in the latest version of data tool.

Here is the way to install Business Intelligence Development Studio

  1. Get the SQL server setup file and run the set up file
  2. After the prerequisites check, you will popped up with a window to select features.
  3. Select Business Intelligence over there and click on next, next...

After the installation complete, your machine is ready with BI 2008.

You can follow the same thing for installing any SSDT version. Get the SQL server and select features. That's it.

Hope it helps.

--
Happy Coding
Gopinath.

The dependent component SavedQuery (Id="View GUID") does not exist. Failure trying to associate it with SystemForm (Id="Some Id") as a dependency.

Hi,

Today when I was exporting some solution from one Org to another got an different error.

"The dependent component SavedQuery (Id="View GUID") does not exist. Failure trying to associate it with SystemForm (Id="Some Id") as a dependency. "

Here is the fix for it

  1. Open customizations XML in some editor and search with "View GUID". Found a view is showing multiple view ids in the XML of the sub grid.

  2. Check the XML further to know where the sub grid is placed.
  3. Open CRM form and goto subgrid properties.
  4. Set view selector to Show All Views, save and publish the customizations.
  5. Re-open the same again and set View Selector to Off, save and publish the changes.

That's it. Now, you can export the solution and happily import to another without any issue.

Hope it helps.

--
Happy CRM'img
Gopinath.
 
 

Thursday, 16 April 2015

Set Status(Activate/De-activate) of the CRM record

Hi,

We do activate and deactivate CRM record more often. Sometimes, we get the requirement to do the same in the plugin/workflow/some job.

Here is the code for activating and de-activating the CRM record.


private void SetStatus(bool active, string entityName, Guid entityId, IOrganizationService objService)
{
       SetStateRequest objSetStateRequest = new SetStateRequest();
       objSetStateRequest.EntityMoniker = new EntityReference(entityName, entityId);
       if (!active)
       {
             objSetStateRequest.State = new OptionSetValue(1);
             objSetStateRequest.Status = new OptionSetValue(2);
       }
       else
       {
             objSetStateRequest.State = new OptionSetValue(0);
             objSetStateRequest.Status = new OptionSetValue(1);
       }
       SetStateResponse objSetStateResponse = (SetStateResponse)objService.Execute(objSetStateRequest);
}

Hope this helps

--
Happy CRM'ing
Gopinath

Set PartyList using JavaScript in CRM

Hi,

Here is the code to set the party list values using java script.

Party List is a data type in CRM, using which you can set more than one records of an entity for a single field.
Part List type field, renders as Lookup on the form, but it works as multi select lookup

   var partyRequired = Xrm.Page.getAttribute("to");
    // Create new array
    var partlist = new Array();
    partlist[0] = new Object();
    partlist[0].id = Id; //Guid (i.e., Guid of User or Contact etc)
    partlist[0].name = "Name"; //Name (i.e., Name of User or Contact etc)
    partlist[0].entityType = "systemuser"; //entity schema name of account or contact
    // Set array value
    partyRequired.setValue(partlist);


Hope this helps

--
Happy CRM'img
Gopinath 

Monday, 13 April 2015

Form types and modes in Dynamics CRM 2013/2015

getSaveMode(), returns a value indicating how the save event was initiated by the user.

execContext.getEventArgs().getSaveMode();



Event Mode

Value

Save

1

Save and Close

2

Deactivate

5

Reactivate

6

Send (Email)

7

Disqualify (Lead)

15

Qualify (Lead)

16

Assign (user or team owned entities)

47

Save as Completed (Activities)

58

Save and New

59

AutoSave

70
 
getFormType(): Method to get the form type for the record.

Xrm.Page.ui.getFormType();



Form Type

Value

Undefined

0

Create

1

Update

2

Read Only

3

Disabled

4

Quick Create

5

Bulk Edit

6

Read Optimized

11

--
Happy CRM'img
Gopinath.

Thursday, 9 April 2015

Convert QueryExpression to Fetch XML or FetchXML to QueryExpression

Here is the way to convert to Query Expression to Fetch XML or Fetch XML to Query Expression.


QueryExpression objQueryExpression = new QueryExpression("account");
objQueryExpression.ColumnSet = new ColumnSet("accountid");
// QueryExpression To Fetch XML Conversion.
var queryExpToFetchRequest = new QueryExpressionToFetchXmlRequest
{
       Query = objQueryExpression
};
var conversionResponse = (QueryExpressionToFetchXmlResponse)objService.Execute(queryExpToFetchRequest);
string fetchXml = conversionResponse.FetchXml;
string strTestFetchXML = "<fetch distinct='false' no-lock='false' mapping='logical'><entity name='account'><attribute name='accountid' /></entity></fetch>";

// Fetch XML To QueryExpression Conversion.
var fetchToQueryExpressionRequest = new FetchXmlToQueryExpressionRequest
{
       FetchXml = strTestFetchXML
};
var fetchToQueryExpressionResponse = (FetchXmlToQueryExpressionResponse)objService.Execute(fetchToQueryExpressionRequest);
QueryExpression objQueryExp = fetchToQueryExpressionResponse.Query;


--
Happy CRM'img
Gopinath

Wednesday, 8 April 2015

New Features in Microsoft Dynamics CRM 2015 – Update 1 or code name “Carina”

Here are some new features in MS CRM 2015 (Carina)

Themes 
How to apply themes
1) Go to Settings–>Customization
2) Click “Themes”
3) Select the CRM default theme, then click “Clone” to make a copy of the default theme.
4) Change the value for Header Color to HTML color code #6699CC

Export and Import
At last with CRM 2015 online Update 1 or Code name "Carina", we got an answer to many customers question about the Advance Find Export option.

The record limitation for both import and export has been increased to 100,000 records or 32MB! Yes you read that correctly, this has been increased from 10,000 to 100,000 records.

New Navigation
Check this video for more information on the navigation

 


--
Happy CRM'img
Gopinath

CRM 2015 Export and Import


At last with CRM 2015 online Update 1 or Code name "Carina", we got an answer to many customers question about the Advance Find Export option.

The record limitation for both import and export has been increased to 100,000 records or 32MB! Yes you read that correctly, this has been increased from 10,000 to 100,000 records.

--
Happy CRM'img
Gopinath

CRM 2015 Online Spring ’15 Updates with UI themes

CRM 2015 online Update 1 or Code name "Carina" is coming up with new navigation and user interface.

How to apply themes

  1. Go to Settings–>Customization
  2. Click “Themes”
  3. Select the CRM default theme, then click “Clone” to make a copy of the default theme.
  4. Change the value for Header Color to HTML color code #6699CC
--
Happy CRM'ing
Gopinath.

Friday, 3 April 2015

Customize PartyList in CRM 2013 and 2015

We used to customize partylist in CRM 2011 by using the following code.

lookuptypeIcons = '/_imgs/ico_16_2.gif:/_imgs/ico_16_8.gif';
lookuptypenames = 'contact:2:Contact,systemuser:8:User';
lookuptypes = '2,8';
if (crmForm.all.to != null) {
       crmForm.all.to.setAttribute("defaulttype", "2");
       crmForm.all.to.setAttribute("lookuptypes", lookuptypes);
       crmForm.all.to.setAttribute("lookuptypenames", lookuptypenames);
       crmForm.all.to.setAttribute("lookuptypeIcons", lookuptypeIcons);
       Xrm.Page.getControl("to").setDefaultView("A2D479C5-53E3-4C69-ADDD-802327E67A0D"); //GUId for  default View 
}

This code won't work in CRM 2013 and 2015 but we can achieve same functionality by write the code on the focus of the field


$("#to").focus(function () {
    var toLookUp = $("img[attrName='to']");
    var lookuptypeIcons = '/_imgs/ico_16_2.gif?ver=828891367:/_imgs/ico_16_8.gif??ver=828891367';
  var lookuptypenames = 'contact:2:Contact,systemuser:8:User';
    lookuptypes = '2,8';
    if (toLookUp.length > 0) {
        toLookUp[0].setAttribute("lookuptypenames", "contact:2:Individual,systemuser:8:User");
        toLookUp[0].setAttribute("lookuptypes", "2,8");
        toLookUp[0].setAttribute("lookuptypeIcons", lookuptypeIcons);
        toLookUp[0].setAttribute("createpermissiondictionary", "contact:true,systemuser:true");
        toLookUp[0].setAttribute("DefaultViewId", "A2D479C5-53E3-4C69-ADDD-802327E67A0D");
        toLookUp[0].setAttribute("defaulttype", 2);
    }
});


--
Happy CRM'img
Gopinath