Git Product home page Git Product logo

sparklexrm's Introduction

SparkleXrm

An open-source library for building Dynamics CRM XRM solutions using Script#, jQuery & Knockoutjs.

License: MIT

www.SparkleXrm.com

SparkleXrm is currently in a Preview alpha release.

If you are interested in getting a feel for this project, you can install the SparkleXrm_0_1_0_managed.zip and QuoteLineEditor_0_1_0_managed.zip managed solution and check it out. Open a quote, and use the 'Quote Products' tab on the form to add/edit/remove quote products.Once you've finished, deleting the solutions afterwards will remove all trace!

Building the Source

To build the source you will need to install:

  • VS2012
  • Developer Toolkit for VS2012
  • Script# v0.7.5 (Install through Tools->Extensions & Updates)
  • PowerShell Tools for Visual Studio 2012 v1.0.5 (Install through Tools->Extensions & Updates)

The DebugWeb project allows you to run and debug the samples without publishing to CRM. The standalone samples projects use fiddler to allow debugging, but I found having a dedicated test web easier for the full source.

Design Goals

  1. Make writing client extensions for Dynamics CRM as close as possible to writing Server extensions!
  2. Provide User Interface controls for editable grids and form fields
  3. Speed up the code/build/publish workflow and reduce JavaScript debug time.
  4. Provide UI Validation controls that work for grids and forms
  5. Provide localisation support for multi-language/date/number formats.
  6. Other libraries do a good job of providing a JavaScript library for SDK calls, but SparkleXrm aims to provide an overall framework that Xrm applications can be built upon. I don't see SparkleXrm as a replacement for those libraries for when you simply need to write from JavaScript. SparkleXrm's intended use is where you want to speed up development of HTML web resources as part of your Xrm project. In these cases, it is natural to use the same library for form/ribbon JavaScript as well.
  7. Compatible with CRM2011, CRM2013 and CRM2015. The 0.x solution is a CRM2011 managed solution that can also be imported into CRM2013. The 7.x solution is CRM2015 managed solution.

Read Setting up a new SparkleXrm Project and about the Quote Line Editor before you dive into the source!

sparklexrm's People

Contributors

aelsmore avatar benhormann-intergen avatar camelcasedave avatar carltoncolter avatar coreysutton avatar ewingjm avatar filcole avatar fixrm avatar geerzo avatar janis-veinbergs avatar janiskulj avatar jlattimer avatar knordum avatar mattp65 avatar pawelgradecki avatar ryanklee avatar ryanmichaeljames avatar sabrish avatar scottcolson avatar scottdurow avatar teppolainio 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sparklexrm's Issues

Possible Paging Issue when searching large datasets with MultiEntity Search

Multi-entity search, two part issue with large data sets:

  1. In production scaled environment (n >> 5,000 records), Quick Find Record Limits != true... if your search returns a large data set, and you search beyond the paging limits by clicking and dragging the scroll button, it is possible to cause an invalid argument error and possibly to create an index issue (we had a new index issue pop up suspiciously close to the time of this scrolling/paging issue). This occurred in a CRM Online instance which I believe is a typical use case.

Possible fixes:
-Shorten the initial limit of records returned, similar to Outlook so as to eliminate the possibility of outpacing the record loading (e.g. return only top 2000 records instead of 5000, then provide a "you are searching the top 2,000 results, to see more records click here")
-(optionally?) disable (grey out) the results for the offending entity and display a "The query returns more than 5,000 records. Please provide more specific search criteria." message
-See if modifying client side loading methods can fix this (I've noticed the loading is extremely impressive for normal scrolling, only click and drag scroll button can outrun the query returns)

  1. In production scaled environment (n >> 5,000 records), Quick Find Record Limits === true... Because of the query databinding, it seems as though Quick Find Record Limits being turned on will always throw an error in a large database once the user starts typing, because the fetch query is initiated as soon as you type your first letter (e.g. searching by 'echo' first searches by 'e' then by 'ec' etc.). If you can type fast, it is possible to outrun the data binding with your typing- but end users include those of the 'hunt and peck' variety and so a real-world implementation will cause a conflict with Quick Find Record Limits.

Possible fix: check for Quick Find Record Limits = true and if so, defer the query until the search button onClick() event

Universal Editable Grid

Hi Scott,

I'm trying to implement Editable Grid based on "savedquery". The main idea to develop webresource that can get viewId from the "data" parameter and based on it build editable grid for any entity (it is possible to edit only root entity fields). I faced with problem that I can't make my grid editable. I started with using "QueryParser" and as I understand the next step is to bind fields to editors based on metadata and to extend "Entity" object in runtime with entity fields (I'm a new one in S#, I tried to use Script.Literal to do it but I got compilation error). I would be grateful for any help.
Thank you

Minimum UR version for SparkleXrm on CRM 2011?

Hi Scott - Is there a minimum UR version required for SparkleXrm on CRM 2011? I'm trying to run the Quote Line Editor sample on UR11 but get a spinning / loading indicator where the in-line editor should display.
Thanks - Gareth

How to Start!!

Hello,
First of all this is one of the greatest products out there...

We are developing a custom Dashboard (Dashboard using a single webresource),
and we need to add grids and graphics with the same look and feel of CRM 2013.

We download your solution, the examples are amazing. The thing is.... were can we start building our one html grid?
we are lost
Can you please help us getting started?

Start Menu Does not Work On CRM 2013

Installed both SparkleXrm_0_1_0_managed.zip StartMenu_1_3_managed.zip on a Plain vanilla CRM 2013 (English version).

Import Issue

After importing the following warning appears:
'Translated labels for the following languages could not be imported because they have not been enabled for this organization: 1031'

Usage Issue

Following import and publish, the ribbon button appears, but nothing happens (the start menu can NOT be seen). After clicking the new button, an error popup message appears (see contents bellow).

Client Environment:

Windows Server 2012
Chrome browser (latest version)
CRM 2013 UR 2 (CRM build 6.0.2.51)

BTW

I have also tried the other samples (QuoteLineEditor) - it seems not to function as well.
(The web resource is not displayed).

Also tried installing SparkleXrm_0_1_0_managed.zip and QuoteLineEditor_0_1_0_managed.zip
A new tab is added in CRM 2011, but nothing is displayed within the tab.

I will highly appreciate your advice.

Thanks

Yuval Rashelbach
NextGen Consulting
[email protected]
+972-50-747-8320

Error Data

Microsoft Dynamics CRM Error Report Contents

1.0 Uncaught TypeError: Cannot read property 'privileges' of null 321 /main.aspx#191661530 anonymousr:Cannotreadproperty'privileges'ofnull anonymousr:Cannotreadproperty'privileges'ofnull Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 undefined undefined undefined 1680x1050 Web 2014-05-18T17:29:57 1033 1033 1033 1033 {B41BBDCA-0BDC-E311-943D-000C29944B7F} {38FAF3D6-0BDC-E311-943D-000C29944B7F} 6.0.2.51 1.0 Uncaught TypeError: Cannot read property 'privileges' of null 321 /main.aspx#191661530 anonymousr:Cannotreadproperty'privileges'ofnull anonymousr:Cannotreadproperty'privileges'ofnull Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 undefined undefined undefined 1680x1050 Web 2014-05-18T17:30:03 1033 1033 1033 1033 {B41BBDCA-0BDC-E311-943D-000C29944B7F} {38FAF3D6-0BDC-E311-943D-000C29944B7F} 6.0.2.51 1.0 Uncaught TypeError: Cannot read property 'privileges' of null 321 /main.aspx#191661530 anonymousr:Cannotreadproperty'privileges'ofnull anonymousr:Cannotreadproperty'privileges'ofnull Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 undefined undefined undefined 1680x1050 Web 2014-05-18T17:30:05 1033 1033 1033 1033 {B41BBDCA-0BDC-E311-943D-000C29944B7F} {38FAF3D6-0BDC-E311-943D-000C29944B7F} 6.0.2.51 1.0 Uncaught TypeError: Cannot read property 'privileges' of null 321 /main.aspx#191661530 anonymousr:Cannotreadproperty'privileges'ofnull anonymousr:Cannotreadproperty'privileges'ofnull Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 undefined undefined undefined 1680x1050 Web 2014-05-18T17:30:07 1033 1033 1033 1033 {B41BBDCA-0BDC-E311-943D-000C29944B7F} {38FAF3D6-0BDC-E311-943D-000C29944B7F} 6.0.2.51 1.0 Uncaught TypeError: Cannot read property 'privileges' of null 321 /main.aspx#191661530 anonymousr:Cannotreadproperty'privileges'ofnull anonymousr:Cannotreadproperty'privileges'ofnull Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 undefined undefined undefined 1680x1050 Web 2014-05-18T17:30:24 1033 1033 1033 1033 {B41BBDCA-0BDC-E311-943D-000C29944B7F} {38FAF3D6-0BDC-E311-943D-000C29944B7F} 6.0.2.51 1.0 Uncaught TypeError: Cannot read property 'privileges' of null 321 /main.aspx#191661530 anonymousr:Cannotreadproperty'privileges'ofnull anonymousr:Cannotreadproperty'privileges'ofnull Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 undefined undefined undefined 1680x1050 Web 2014-05-18T17:30:24 1033 1033 1033 1033 {B41BBDCA-0BDC-E311-943D-000C29944B7F} {38FAF3D6-0BDC-E311-943D-000C29944B7F} 6.0.2.51 1.0 Uncaught TypeError: Cannot read property 'privileges' of null 321 /main.aspx#191661530 anonymousr:Cannotreadproperty'privileges'ofnull anonymousr:Cannotreadproperty'privileges'ofnull Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 undefined undefined undefined 1680x1050 Web 2014-05-18T17:30:38 1033 1033 1033 1033 {B41BBDCA-0BDC-E311-943D-000C29944B7F} {38FAF3D6-0BDC-E311-943D-000C29944B7F} 6.0.2.51

Grid displays blank rows on Refresh if not on Page 1.

When refreshing the grid using the Refresh Button the grid appears empty if the pager is not on Page 1 when the refresh is started. All pages except page 1 also appear as empty unless user navigates to page 1 and then navigates to other pages.

XrmOptionSetEditor

Hello,

I've got this issue on a grid with two columns of two different optionsets.
On the gris, it seems that the both columns have the same options (the same liste of possible values).

thx.

Sparkle Subgrid - OnChange event for 1 field only

Hello guys,

I'm contacting you because i'm trying to change the value of the field "A" only if i change the value of the field "B". Currently and via the "PropertyChanged " method, when i change every field of a row, the field "A" is automatically modified.

Thanks for your help.

Jean-Michel

Question - possibility of using typescript?

I have not actually got my hands dirty with SparkleXrm - yet, but just glanced at the technologies used - and when I saw "scriptsharp" - I immediately thought - would it be possible to use typescript instead - or is scriptsharp too baked in to the architecture?

XrmBooleanEditor

Convert the existing XrmBooleanBinding into a Grid XrmBooleanEditor

SparkleXrmUI.js - Syntax Error

Scott, the issue I had and asked about on Twitter I successfully traced to a syntax error in the following:

                validationIndicator.position({
                                            my: 'left bottom',
                                            at: 'left top',
                                            collision: 'fit fit',
                                            of: activeCellNode
                                        })
                                        .show({
                                        effect: 'blind'
                                        })
                                        .delay( 500000 )
                                        .hide({
                                            effect: 'fade',
                                            duration: 'slow', 
                                        },
                                            function() {
                                                $( this ).remove();

                                            });
                                        ;

I'm still learning this so please forgive me that I am not precisely sure where the root of this error is.

There is a comma after duration: 'slow' which causes a parsing error. I simply took the comma out by opening your managed package (using 0.2.0 because I am on 2011) and editing the SparkleXrmUI.js at line 2791.

I believe this is still in there, since I found the same issue in a recent clone - /DebugWeb/WebResources/sparkle_/js/SparkleXrmUI.js
at line 208.

When rendering in a standalone window, this caused the whole SparkleXrm object to be undefined. Not sure why this works when running inside a standard entity window.

Thank you for a great toolset. I'm still coming up to speed on it but I'm already using it to great effect for the 2nd time.

Examples does not work in Firefox

Hi Scott,

When I open htm pages in Firefox 26.0 I can see an empty page
(e.g. ActivitySubGrid.htm, ContactEditor.htm)
They work in IE and Chrome.

It looks like the issue appears in
xmlHttpRequest.withCredentials = true;; line of the Xrm.Sdk.OrganizationServiceProxy._getResponse method.
It seems it relates to sync request for FF only.

Is it possible / make sense to make xmlHttpRequest.withCredentials configurable e.g. on GetResponse method level?

Thank you

Multisearch shows all Records of several Entities (not filtering)

We tried out MultiEntitySearch in our Company. Works like charme.
On an Online Org from a Customer we see, that search gives back all Records of several Entities.
This happens to account (5000+), contacts (5000+) and opportunities (3405 records). Leads, Users and Activities look good.
Took a look on the Account fields and edited searchable datefields (see Issue #38 ), removed search from those fields, but no changes.
I don't see any javascript errors in the debugging console of the browser.

MultiEntity Search Lookup Field returns GUIDs instead of Names

Hi Scott,

One of my searchable fields is a lookup. Looks like the search tries to search the [0].id instead of the [0].name ...? As a result what looks to me like a FormatException caused by an underlying type error.

Also, can you confirm which webresource I should hit in order to configure the search? I have a custom site map so the config page didn't get added by default on loading the solution.

Thanks,

Joe

multi-entity search guiid issue

QuoteLineEditor : Update on Lookup field does not work

Lookup editor Property change event does not work.
The "IsValueChanged" method of XrmLookUpEditor.cs always returns false , which does not call the property change event and thus the entityState remains Unchanged and the changes are not saved.

Support for VS2013 and beyond

Scott,
Any news on the possible support of VS2013 or later? I would really like to do more with SparkleXRM but I would need to be able to develop with VS2013.

Grid Editor - Displaying Aliased Values On Lookup Fields

I am using Grid Editor to display an Opportunity Product. I have a Lookup to the Existing Product. This follows the pattern as Scott's sample for the Quote editor.

When I use the Lookup, I want it to display the productnumber field rather than name. I can edit this when the user conducts a search by editing the SearchCommand.

But when I load the Editor again, I get the name attribute again.

In the constructor for the OpportunitylineItemEditorViewModel, there is a Fetch, to which I added:

...
<link-entity name='product' from='productid' to='productid' visible='false' link-type='outer' alias='ep'>
     <attribute name='productnumber' />
</link-entity>
...

Note the alias name ep to represent the existing product.

So when I try to use this in the init, I can't get it to recognize the productnumber name.

            XrmLookupEditor.BindColumn(
                GridDataViewBinder.AddColumn(columns, "Existing Product", 200, "productid"),
                vm.ProductSearchCommand, "productid", "ep.productnumber", "");

The dot syntax (ep.) is the way it's done in JavaScript in my experience, so I'm using that.

I also tried updating the ScriptName variables in both the Model (OpportunityProduct.cs) and Observable ViewModel (ObservableOpportunityProduct.cs), e.g.,

        [ScriptName("ep.productnumber")]
        public Observable<string> ProductNumber = Knockout.Observable<string>();

Is this supported? If so, I'd appreciate some feedback on where I'm going wrong. Thank you!

Multi select option set field.

Hi Scott ,
I follow SparkXrm project from few days an a like the job your are doing.
I have few questions.

  1. Working on CRM I need to build form and ask questions to the user. I would be able to manage responses with optionset and multiple selection.
    This type doesn't exist natively in CRM, could we easily enhance sparkleXRM to support this kind of field?
  2. You are using script# 0.7.5.1. In your roadmap do you expect to support 0.8 version?
  3. Could we bind the controls on datasource different from CRM (non CRM odata , webapi, rest services...)?

Two decimal separators in negative currency

I noticed a bug that occurs when you have a negative currency with a decimal part such as $-58.58. When that is the case it shows $-58..85

I fixed this on my end by changing a line in "public static string Format(Number value,NumberFormatInfo format)" function:

string decimalPartString = value.ToString().Substr(wholeNumberString.Length + 1 + (value < 0 ? 1: 0));

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.