Showing posts from May, 2015

Filtering on opportunity products lookup ("Existing Product" lookup inside Opportunity Product entity)

function AddNewView2() {  try {  $("#productid").attr("disableViewPicker", "0");  // Parameters  var customViewId = "FD140AAF-4DF4-11DD-BD17-0019B9312238"; // new id  var customViewName = "Sales Products";  var lookupFieldName = "productid";  var entityName = "product";  var primaryKeyName = "productid";  var primaryFieldName = "productid";  // Create Dynamics View  AdvancedFilteredLookup2(lookupFieldName, customViewId, entityName, primaryKeyName, primaryFieldName, customViewName);  $("#productid").attr("disableViewPicker", "1");  }  catch (err) {  } } // Advanced Filtered Lookup function AdvancedFilteredLookup2(lookupSchemaName, viewId, entityName, primaryKeyName, primaryFieldName, viewDisplayName) {  var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical'>" + "<entity

CRM Developer Tools in Visual Studio 2015

It seems CRM Developer Tools are not getting much love from Microsoft lately. The versions available for CRM 2013 where only for VS2013 and V2012 It’s not been release as part in CRM 2015 SDK yet. …and VS 2015 is just around the corner… But there is always a way, ;)… There are known work around (e.g.: Microsoft Dynamics CRM 2013 Toolkit with Visual Studio 2013) to make this work on VS2013 but I found none so far to deal with VS2015. After looking around and doing some tests I found a MVW (Minimum Viable Workaround, ;)) to make this work. Two simple steps should do it, as per below: Add the below to devenv.exe.config <dependentAssembly> <assemblyIdentity name="Microsoft.Windows.Design.Host" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="" newVersion="" /> </dependentAssembly> Instal

How to update the value of parent entity field while updating child entity in ms crm 2011 using javascript

Parent Entity  to open the child entity in popup windows with selected records function addPriceEndDate(selecteditemsid) { var parameters = {}; parameters["selecteditemsid_0"] = selecteditemsid;   Xrm.Utility.openEntityForm("cel_priceenddate", null, parameters);     } Add the Below parameters in ribbon workbench. From child entity we updating the parent entity fields in my case I am updating End date. Below is script. function onPriceEndDateSave() { if (getQuerystring('selecteditemsid_0') != null) { var accountid = getQuerystring('selecteditemsid_0'); accountid = ReplaceString(accountid ,"%7b","{"); accountid = ReplaceString(accountid ,"%7d","}"); accountid = ReplaceString(accountid ,"%2c",","); var priceids= new Array(); priceids= accountid.split(","); for (price in priceids) { updateRecord(priceids[price]); } } } fun