Giter Site home page Giter Site logo

xrmservicetoolkit's Introduction

Gitter

A while ago when developing a typescript version I also rewrote the documentation to jsdoc. Here you can see the result, maybe it helps you along faster. XrmServiceToolkit Documentation

Project Description

XrmServiceToolkit is a JavaScript library which can be used for JavaScript Development under the platform for Microsoft Dynamics CRM 2011/2013/2015 environments. The library contains four major parts regarding functions.

  • Common: General Methods used for various purpose.
  • Rest: Organization Data Service functions including CRUD, Associate, Disassociate, etc
  • Soap: Organization Service functions including CRUD, Fetch, Associate, Disassociate, etc
  • Extension: jQuery extension to utilize WebResource to extend CRM 2011 / CRM 2013 / CRM 2015 including dependent OptionSet, field tooltip, add custom filter view to lookup field. (Some Methods 'Unsupported'. Some of these methods have either been replaced with supported methods or deprecated in CRM 2013 version)

Next(develop branch)

  • Added CommonJS and AMD Module support
  • Fixed typos in comments

CRM 2015

  • V2.2 is the official release for CRM 2015 support
  • If you are on CRM 2015 online Update 1, please go to download page and download v2.2.1

CRM 2013

  • A beta version has just been released in source code section for CRM 2013 [changeset: 25977]
  • CRM 2013 Support and Development
  • Tested CRM 2013 server
    • PC
      • CRM 2013 on-premise for IE10, latest chrome, latest firefox
      • CRM 2013 online for IE10, latest chrome, latest firefox
    • Tablet - iPad 2, iOS 7.0.2
      • CRM 2013 online for latest chrome, latest safari
    • Tablet Client
      • iOS Client - iPad 2, iOS 7.0.2
      • Windows App - Windows 8, Windows RT

Debug / Unit Test JavaScript Rest or Soap in Visual Studio For CRM 2011

Debug Soap / Rest in Visual Studio For CRM 2011

Whats new

Version 2.2

Dependency JSON2, jQuery 1.7.2 or above

Date: April, 2015

  • Tested Browser: IE10, IE11, Chrome (latest), Firefox (latest)
  • Tested CRM server: CRM 2015, CRM 2013, CRM 2011
  • Bug fixes for XrmServiceToolkit.Sopa.Fetch
  • Bug fixes for error handling
  • Dependency JSON2, jQuery 1.7.2 or above

Date: October, 2014

  • Tested Browser: IE10, IE11, Chrome (latest), Firefox (latest)
  • Tested CRM server: CRM 2011 with RU17, CRM 2013 online, CRM 2013 on-premise with SP1
  • Performance refactor release.
  • Minified version release
  • Bug fixes for XrmServiceToolkit.Soap.Fetch
  • Bug fixes for extension methods

Version 2.0.1

Dependency JSON2, jQuery 1.7.2 or above(modified)

Date: April, 2014

  • Tested Browser: IE10, Chrome (latest), Firefox (latest)
  • Tested CRM server: CRM 2011 with RU16, CRM 2013 online, CRM 2013 on-premise with RU2
  • New Behaviour - XrmServiceToolkit.Soap.Fetch now allows limited return with 'page' and 'count' parameters in fetch xml
  • New Fix - XrmServiceToolkit.Soap.Fetch fixed an issue when passing different format of fetchXml with/without <fetch> part
  • New Fix - XrmServiceToolkit.Extension fixed an issue when retrieving web resources.

Version 2.0.0

Dependency: JSON2, jQuery 1.7.2(modified)

Date: October, 2013

  • Tested Browser: IE10, Chrome (latest), Firefox (latest)
  • Tested CRM server: CRM 2011 with RU15, CRM 2013 online, CRM 2013 on-premise RTM
  • New Behaviour - XrmServiceToolkit.Soap.Fetch parameters change to work with asynchronous callback compared to 1.4.2 beta: * XrmServiceToolkit.Soap.Fetch(fetchXml, fetchAll, callback)
  • New Behaviour - XrmServiceToolkit.Common.AddNotification is working with CRM 2013 using the out-of-box functionality. Still support CRM 2011
  • New Fix - XrmServiceToolkit.Comon.GetObjectCodeType is now using metadata retrieval as a supported method
  • New Fix - The included jQuery has a line changed at the bottom <window.jQuery = jQuery;> $ is removed to work with CRM 2013 form

Version 1.4.1

Dependency: JSON2, jQuery 1.7.2 above

Date: April, 2013

  • New Feature: Add more cross browser support for RU12, RU13
  • Tested Browser: IE9, IE10, Chrome (latest), Firefox (latest)
  • New Fix: XrmServiceToolkit.Common.AddNotification method updated for RU12, RU13, still compatible for RU11 below
  • New Fix: XrmServiceToolkit.Soap.Fetch method did not format linked record correctly
  • New Fix: XrmServiceToolkit.Soap.Retrieve method did not return partylist data for activity
  • New Fix: Added manual conversion from String to Date conversion for cross browser
  • New Fix: getServerUrl method is updated as getClientUrl to align with RU12 SDK method getClientUrl(), still compatible to support RU11 below
  • New Function: getServerUrl private method is updated as getClientUrl to align with RU12 SDK method getClientUrl(), still compatible to support RU11 below
  • New Function: XrmServiceToolkit.Soap.RetrieveAllEntitiesMetadata method is a method to return all metadata for all entities by the specified entity filters
  • New Function: XrmServiceToolkit.Soap.RetrieveEntityMetadata method is a method to return the metadata for a certain entity by the specified entity filters
  • New Function: XrmServiceToolkit.Soap.RetrieveAttributeMetadata method is a method to return the metadata for a certain entity's attribute

Version: 1.4.0

Dependency: JSON2, jQuery 1.7.2 above

Date: January, 2013

  • New Feature: Add more cross browser support for RU12
  • Tested Browser: IE9, IE10, Chrome Version 24.0.1312.56 m, Firefox 18.0.1

Version: 1.3.2

Dependency: JSON2, jQuery 1.7.2 above

Date: January, 2013

  • New Fix: An issue where XrmServiceToolkit.Soap could not be initialized properly when calling from Ribbon for CRM Online
  • Add more cross browser support for coming RU12

Version: 1.3.1

Dependency: JSON2, jQuery 1.7.2 above

Date: November, 2012

  • New Feature:
  • A logic change to improvie performance when retrieving larger number of records
  • New Function:
  • XrmServiceToolkit.Soap.QueryAll: a method to return all records (>5k+). Similar to how to use XrmServiceToolkit.Soap.QueryByAttribute
  • New Fix:
  • XrmServiceToolkit.Rest.RetrieveMultiple not returning more than 50 records
  • XrmServiceToolkit.Soap.BusinessEntity not working properly with number attribute like int, double, decimal
  • XrmServiceToolkit.Soap not handling error message properly.

Version: 1.3

Dependency: JSON2, jQuery 1.7.2 above

Date: July, 2012

  • New Feature
  • Integration with jQuery
  • Cross Browser support (TODO: Testings for real 'cross-browser' support. Long Story)
  • New Extension:
  • JQueryXrmDependentOptionSet: Create Configurable Dependent Option Set to utilize CRM 2011 web resource.
  • JQueryXrmFieldTooltip: Create configurable tooltip for fields on CRM 2011 form
  • JQueryXrmCustomFilterView: Create configurable resource to add custom filter view to crm 2011 lookup field on the form
  • JQueryXrmFormatNotesControl: Format the notes control to allow insert, allow edit

Version: 1.2

Dependency: JSON2

Date: May, 2012

  • New Fix - Create, Update, Retrieve activity with Party List Type. See documentation and test page for details

Version: 1.1

Dependency: JSON2

Date: April, 2012

  • New Function - XrmServiceToolkit.Soap.Assign
  • New Function - XrmServiceToolkit.Soap.GrantAccess
  • New Function - XrmServiceToolkit.Soap.ModifyAccess
  • New Function - XrmServiceToolkit.Soap.RevokeAccess
  • New Function - XrmServiceToolkit.Soap.RetrievePrincipalAccess

Whats coming

CRM 2013 development and toolkit expansion for cross browser, cross platform development.

  • Finalize Cross-Browser Support.
  • Tune performance

If you have suggestions, please also let me know.

xrmservicetoolkit's People

Contributors

hinogi avatar zskovacs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xrmservicetoolkit's Issues

JSProvider.ashx

Using last chrome version, the library is showing on console:

Refused to set unsafe header "Content-Length"

_common/JsProvider.ashx?ids=1759665639-1968334880-202661451-1547461133-1979…838-1501510414-867105739-1281389456-2050812538-512064351&ver=-715257483:20"

And

"The provided value 'msxml-document' is not a valid enum value of type XMLHttpRequestResponseType."

FetchXml return no records, deserialize error

When running a fetch xml statement which is guaranteed to return no records, the deserialization of the result set is guaranteed to fail.

As an example, if you attempt to run a fetchxml statement to retrieve the quote products for any quote where you know for certain that there are no associated quote products, the deserialize method fails

As an example I have modified an existing fetchxml I'm currently using that would be guaranteed to return 0 records. At the point of attempting to deserialize the data an exception is thrown

<fetch aggregate='true' >
	<entity name='quotedetail' >
		<attribute name='quantity' alias='quantity' aggregate='max' />
		<filter type='and' >			
			<condition attribute='quoteid' operator='eq' value='[QuoteID]' />                    
			<condition attribute='priceperunit' operator='gt' value='1'/>
		</filter>
	</entity>
</fetch>

JSProvider.ashx

Dynamics CRM 2015 7.0.2.53 (DB 7.0.2.53)

Visual Studio solution built with no errors. XrmPageTemplate, XrmServiceToolkit, PageData, JSON2, JQuery all added to the contact form successfully.

Accessing http:///DEVELOPMENT/_common/JsProvider.ashx prompts the user to save or run JsProvider.js file. Upon saving and reviewing the file, contains data such as:

// 1063764345 : /_static/activities/activities.js
// 280177609 : /_static/activities/activity.js
// 935575549 : /_static/activities/activityscheduling.js
// 1333738519 : /_static/activities/appointment.js
// 1902957356 : /_static/activities/email.js
...

Within Google chrome console, consistantly returns SCRIPT errors; ALL relating to JsProvider.ashx. For example:

SCRIPT438: Object doesn't support property or method 'get_currentControl'
File: JsProvider.ashx, Line: 4, Column: 1741
SCRIPT5007: Unable to set property 'PrimaryEntity' of undefined or null reference
File: JsProvider.ashx, Line: 6, Column: 3660
...

I am not sure if this is a known issue but cannot find anything, as far as a resolution goes, about this issue.

Rest call is returning response with namespace like 's:Body' with IE 11, but working fine in Chrome

I have noticed that XrmServiceToolKit 2.2 onwards is returning a namespace "s:" and whole namespace hierarchy down the line in response for Internet Explorer only, whereas for Chrome it is working fine.

I have noticed this behavior in CRM 2015 on-premise instance.

If I use XrmServiceToolKit 2.0.1, then is working as expected in both Chrome and IE.

XrmServiceToolKit 2.0.1 is working fine in IE 11 browser :
response from xrmservicetoolkit 2 2 in chrome

Issue in same IE 11 browser introduced by XrmServiceToolKit 2.2:
issue in ie

This Code is working fine Chrome and IE with XrmServiceToolKit 2.0.1, but falling in IE for XrmServiceToolKit 2.2
2018-03-08_17-59-27

Same XrmServiceToolKit 2.2 is working fine in Chrome browser :
normal

Getting more done in GitHub with ZenHub

Hola! @con-ssc has created a ZenHub account for the XrmServiceToolkit organization. ZenHub is the only project management tool integrated natively in GitHub – created specifically for fast-moving, software-driven teams.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Multi-Repository burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • Time-saving shortcuts – like a quick repo switcher, a “Move issue” button, and much more.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @con-ssc.

ZenHub Board

Exception while trying to deserialize the message (DateTime field)

I am seeing an error when using the toolkit.

"Exception: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://schemas.microsoft.com/xrm/2011/Contracts/Services:request. The InnerException message was 'There was an error deserializing the object of type Microsoft.Xrm.Sdk.OrganizationRequest. The value 'NaN-NaN-NaNTNaN:NaN:NaN' cannot be parsed as the type 'DateTime'.'. Please see InnerException for more details."

<b:key>estimatedclosedate</b:key><b:value i:type='c:dateTime' xmlns:c='http://www.w3.org/2001/XMLSchema'>NaN-NaN-NaNTNaN:NaN:NaN</b:value> is what is being sent

This is what I see in the toolkit.
"b": "http://schemas.datacontract.org/2004/07/System.Collections.Generic",

This link for 'b' is no longer valid. Server not found. But maybe it never was reachable through a browser session.

Just wondering how to get date format correct? Thanks. Other attributes update correctly.

errorHandler fails because JSON.parse does not handle empty string in req.responseText

Hi, I have a problem with XrmServiceToolkit, is this the place to report it?

Essentially errorHandler fails when the webserver returns an error such as 12152 or 12019, as the JSON.parser cannot parse the empty string req.responseText. The debugger reports "Syntax Error".

As the XmlServiceToolkit error handler fails, nothing is returned to the caller, so our calling UI hangs waiting for a response that never comes.

If I replace the error string operations:
"Error : " +
req.status + ": " +
req.statusText + ": " +
JSON.parse(req.responseText).error.message.value

...wIth a simple string (e.g. "Hacked error string") it works fine. The problem is the JSON.parse cannot handle empty string.

Instructions for building from source?

Are there any instructions for building from source?

It seems the .min file is behind the full version. Is it best to just run it through a generic minifier and go?

businessEntity.serialize question

 case "number":
value = (attribute.hasOwnProperty("value")) ? attribute["value"] : attribute;
 encodedValue = encodeValue(value);
var oType = (parseInt(encodedValue) === encodedValue) ? "c:int" : "c:decimal";
                            xml.push("<b:value i:type='", oType, "' xmlns:c='http://www.w3.org/2001/XMLSchema'>");
                            xml.push(encodedValue, '</b:value>');
                            break;

"parseInt(encodedValue) === encodedValue" ? always is "c:decimal"
encodedValue string type
INT!=STRING
I hope you can repair it,thanks

Missing primary attribute EntityReference

Hello.
There is a different behaviour while loading records in 365. The result xml is slightly different.
The value of a Lookup does not get loaded correctly into the Entity object.
Pls replace line 1748, 1749 in XrmServiceToolkit.js like this:
From:
entRef.logicalName = getNodeText(oChildNodes[1]);
entRef.name = getNodeText(oChildNodes[2]);
To:
entRef.logicalName = getNodeText(oChildNodes[2]);
entRef.name = getNodeText(oChildNodes[3]);

FEATURE REQ: pass through ids for Update calls success call back (async)

will IT be possible to have the sucesscallback passthrough the id of the record upon async update call?

e.g.
XrmServiceToolkit.Rest.Update(
results[i][primaryIdField],
results[i],
selectedEntity,
function() {
PASS THE ID INTO THE SUCESS CALL BACK
AppendLog("UPDATE SUCESSFUL!");
},
function(error) {
AppendLog(error);
},
true
);

iv got error for crm 2011

iv try to crm 2011 using xrmservicetoolkit.
and i found some error that crm error.

has encountered

when closing record page. selecting lookup field.

i dont know hotw to fix it so i just remove servicetoolkit right now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.