Showing 49 of 101 total issues
File xrm.soap.sdk.js
has 2126 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function(global) {
global.Type.registerNamespace("Xrm.Soap.Sdk");
})(this);
(function(global) {
Function Entity
has 302 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.Entity = (function() {
/**
* Universal class for creating, updating and deleting any entity
* @param {String} logicalName
* @param {Guid} id
Function OrganizationService
has 273 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.OrganizationService = (function() {
var url = splittedUrl[0] + "//" + splittedUrl[1],
serviceUrl = url + (splittedUrl.length === 3 && splittedUrl[2] === orgName ? (`/${orgName}`) : "") + xrmServiceUrl,
soapTemplate = compile([
utf8Root,
File xrm.common.js
has 427 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
Type.registerNamespace("Xrm.Common");
(function(global) {
"use strict";
Function CrmProvider
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.CrmProvider = (function() {
const entityMetadataType = "EntityMetadata";
const orgService = new self.OrganizationService();
const crmProvider = function() {};
Function deserialize
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
entity.deserialize = function(resultNode) {
var obj = {},
resultNodes = resultNode.childNodes,
instance = new self.Entity(),
Function objectifyNode
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
objectifyNode = function(node) {
if (node.attributes && node.attributes.length === 1) {
var nil = node.attributes.getNamedItem("i:nil");
if (nil && nil.nodeValue === trueString) {
return null;
Function serialize
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
serialize: function() {
var xml = [`<entity xmlns:a='${contractsXrmNs}'>`],
counter = 1;
xml[counter++] = `<a:Attributes xmlns:b='${genericNs}'>`;
Function QueryExpression
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.QueryExpression = (function() {
const queryTemplate = compile(`<query i:type='a:QueryExpression' xmlns:a='${contractsXrmNs}'><%= query %></query>`);
const criteriaTemplate = compile("<a:Criteria><%= conditions %><a:FilterOperator><%= filterOperator %></a:FilterOperator><a:Filters></a:Filters></a:Criteria>");
const conditionsTemplate = compile("<a:Conditions><% _.each(conditions, function(condition) { %><%= condition.serialize() %><% }) %></a:Conditions>");
const linkEntitiesTemplate = compile("<a:LinkEntities><% _.each(linkEntities, function(entity) { %><%= entity.serialize() %><% }) %></a:LinkEntities>");
Function QueryByAttribute
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.QueryByAttribute = (function() {
const queryTemplate = compile(`<query i:type='a:QueryByAttribute' xmlns:a='${contractsXrmNs}'><%= query %></query>`);
const ordersTemplate = compile("<a:Orders><% _.each(orders, function(order) { %><%= order %><% }) %></a:Orders>");
const attributesTemplate = compile(`<a:Attributes xmlns:b='${arraysNs}'><% _.each(attributes, function(attribute) { %><%= attribute %><% }) %></a:Attributes>`);
const valuesTemplate = compile(`<a:Values xmlns:b='${arraysNs}'><% _.each(values, function(value) { %><%= value %><% }) %></a:Values>`);
Function ConditionOperator
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.ConditionOperator = (function() {
return {
Equal: "Equal",
NotEqual: "NotEqual",
GreaterThan: "GreaterThan",
Function ColumnSet
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.ColumnSet = (function() {
const columnsTemplate = compile(`<a:AllColumns><%= allColumns %></a:AllColumns><a:Columns xmlns:b='${arraysNs}'><% _.each(columns, function(column) { %><%= column %><% }) %></a:Columns>`);
const columnSetTemplate = compile("<a:ColumnSet><%= columnSet %></a:ColumnSet>");
const asLinkColumnSetTemplate = compile("<a:Columns><%= columnSet %></a:Columns>");
const simpleColumnSetTemplate = compile(`<columnSet xmlns:a='${contractsXrmNs}'><%= columnSet %></columnSet>`);
Consider simplifying this complex logical expression. Open
Open
if (c > 96 && c < 123 || c > 64 && c < 91 || c === 32 || c > 47 && c < 58 || c === 46 || c === 44 || c === 45 || c === 95) {
buffer += String.fromCharCode(c);
} else {
buffer += `&#${c};`;
}
Function SetStateRequest
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.SetStateRequest = (function(base) {
const template = compile([
`<request i:type='b:SetStateRequest' xmlns:a='${contractsXrmNs}' xmlns:b='${contractsCrmNs}'>`,
`<a:Parameters xmlns:c='${genericNs}'>`,
"<a:KeyValuePairOfstringanyType>",
Function ExecuteActionRequest
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.ExecuteActionRequest = (function(base) {
const template = compile([
`<request xmlns:a='${contractsXrmNs}' xmlns:i='${xmlSchemaInstanceNs}' xmlns:b='${genericNs}'>`,
"<%= parameters %>",
"<a:RequestId i:nil='true'/>",
Function Guid
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.Guid = (function() {
const regex = /^(\{){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(\}){0,1}$/;
const empty = "{00000000-0000-0000-0000-000000000000}";
const ctor = function(value) {
if (typeof(value) === "object" &&
Function RetrieveEntityRequest
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.RetrieveEntityRequest = (function(base) {
const template = compile([
`<request i:type='a:RetrieveEntityRequest' xmlns:a='${contractsXrmNs}'>`,
`<a:Parameters xmlns:b='${genericNs}'>`,
"<a:KeyValuePairOfstringanyType>",
Function RetrieveAttributeRequest
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.RetrieveAttributeRequest = (function(base) {
const template = compile([
`<request i:type='a:RetrieveAttributeRequest' xmlns:a='${contractsXrmNs}'>`,
`<a:Parameters xmlns:b='${genericNs}'>`,
"<a:KeyValuePairOfstringanyType>",
Function addNotification
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.addNotification = function(id, level, source, message) {
/// <summary>
/// Add a notification bar message with CRM 2011 style
/// </summary>
/// <param name="message" type="String">
Function LinkEntity
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.LinkEntity = (function() {
const template = compile([
"<a:LinkEntity>",
"<%= columns %>",
"<a:EntityAlias i:nil='true'/>",