This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*---------------------------------------- | |
Change fetchXml for a subgrid dynamically | |
-----------------------------------------*/ | |
function FetchViaName(executionContext) { | |
var formContext = executionContext.getFormContext(); | |
var tabObj = formContext.ui.tabs.get("tab_summary"); | |
var secObj = tabObj.sections.get("sec_contactCompaigns"); | |
secObj.setVisible(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FetchViaName(executionContext) { | |
var formContext = executionContext.getFormContext(); | |
var fullname = null; | |
var tabObj = formContext.ui.tabs.get("tab_summary"); | |
var secObj = tabObj.sections.get("sec_contactCompaigns"); | |
secObj.setVisible(false) | |
var isUnified = isUCI() | |
//--------------------------------------Unified Interface----------------------------------------// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getActivities(executionContext) { | |
var formContext = executionContext.getFormContext(); | |
//get current contact id; | |
var recordId = formContext.data.entity.getId(); | |
var ActivitiesSubGridControl = formContext.getControl("ActivitiesSubGrid"); | |
//recordId = recordId.replace("{", "").replace("}", ""); | |
recordId = recordId.slice(1, -1); | |
var orConditionsList = []; | |
var orConditionsFetchXml = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var urlParams = new URLSearchParams(Xrm._page.getUrl()); | |
var viewId = urlParams.get("viewid").replace("{","").replace("}","") | |
console.log("viewId: " + viewId) | |
/* | |
viewId: 61273827-328E-E011-95AE-00155D9CFA03 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DisplayAllChildAccounts(executionContext) { | |
var formContext = executionContext.getFormContext(); | |
var accountId = formContext.data.entity.getId(); | |
var childAccountGridContext = formContext.getControl("ChildAccounts"); | |
if (childAccountGridContext == null) { | |
setTimeout(function () { getAllChildAccounts(executionContext); }, 2000); | |
} | |
else { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Xrm.Sdk; | |
using Microsoft.Xrm.Sdk.Client; | |
using Microsoft.Xrm.Sdk.Query; | |
using System; | |
using System.ServiceModel.Description; | |
namespace MelTools | |
{ | |
class getAllUsersPersonalViewsContainingField |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(typeof(MEA)=="undefined"){MEA={}}; | |
if(typeof(MEA.OptionSet)=="undefined"){MEA.OptionSet={}}; | |
if(typeof(MEA.OptionSet.Utilities)=="undefined"){MEA.OptionSet.Utilities={}}; | |
MEA.OptionSet.Utilities = { | |
//Cascading Utility | |
optionSetBValues : null, | |
Cascade: function (executionContext, optionAName, optionBName, dependecies) { | |
var formContext = executionContext.getFormContext(); | |
var selectedAValue = formContext.getAttribute(optionAName).getValue(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof (MEA) == "undefined") { MEA = {} }; | |
if (typeof (MEA.Opportunity) == "undefined") { MEA.Opportunity = {} }; | |
if (typeof (MEA.Opportunity.OpportunityForm) == "undefined") { MEA.Opportunity.OpportunityForm = {} }; | |
MEA.Opportunity.OpportunityForm = { | |
onLoad: function (executionContext) { | |
var formContext = executionContext.getFormContext(); | |
formContext.getAttribute('budgetamount').addOnChange(this.setNeedApproval); | |
formContext.getAttribute('mea_riskscode').addOnChange(this.setNeedApproval); | |
formContext.getControl('mea_isneedapproval').setDisabled(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof (MEA) == "undefined") { MEA = {} }; | |
if (typeof (MEA.Account) == "undefined") { MEA.Account = {} }; | |
if (typeof (MEA.Account.AccountForm) == "undefined") { MEA.Account.AccountForm = {} }; | |
MEA.Account.AccountForm = { | |
onLoad: function (executionContext) { | |
var formContext = executionContext.getFormContext(); | |
var attributes = formContext.data.entity.attributes; | |
attributes.forEach(att => { | |
att.getAttributeType() == 'lookup' ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof (MEA) == "undefined") { MEA = {} }; | |
if (typeof (MEA.Utilities) == "undefined") { MEA.Utilities = {} }; | |
MEA.Utilities = { | |
onLoad:function(primaryControl, cmdProperties){ | |
var formContext = primaryControl; | |
this.openModalFormForAllLookupFields(formContext); | |
}, | |
openModalFormForAllLookupFields: function(formContext){ | |
var attributes = formContext.data.entity.attributes; |
OlderNewer