August 2011 - Posts

Using CRMSvcUtil

To generate the Early Type Bound we need to generate the entity class.

How to use this tool?

go to setting –> Customizations –> Developer Resources

Here is where you get your services URL, since Service can be separated on different Machine

this is super Important

the Organization UniqueName, Service Endpoints.

like the Discovery, Organization Service, Organization Data Service.

what you need on CRMSVCUtil is the Organization Service.

like wise other SvcUtil, is the authentication parameters : /d /u /p /d.

/out : outputfilename



we can output this command during build on vs,but CRM has options for late bound type.

this autogeneration is separated to different tools, it was previously integrated I think. because

this generating slow down the performance


You could also add an extension to what is being generated.

you could include the customization dll, like on example /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration"

Share this post: | | | |
Posted by cipto with no comments

Working with XMLReader on Sencha Touch

We all should start by including senchatouchdebug.js, or w/comment.js. so that we can read the code and put breakpoint on it to trace better.

On SencaTouch or Ext js, we all work with Data , and it’s all related to these components:

Model, Store, Proxy, Ui Controls(List/NestedList/HTML/Carousel/Form).


Model can have Mapping , custom Convert function.

Model can have association, hasMany or belongTo


consider this xml Structure

Don’t use the TotalProperty or SuccessProperty for your custom mapping


Store is a way to Save your Result, it can store to html5 storage, or on memory on your js objects and it cache it for you or not

Store.ClearOnLoadPage : clear the result when movement/navigation happened

Store could have Proxy in it, and proxy can have reader in it.


Proxy have several type : Memory, Ajax, ScriptTag,Server,SessionStorage,WebStorage

Reader attached to Proxy : is the way how to read your result is it XML or JSON


Powerful templating. Could use custom Js Function , passed in the Values


var tpl2 = new Ext.XTemplate('<div class="shoutoutdate">{[this.formatDate(values.dateadded)]}</div>',
compiled: true,
formatDate: function (datetime) {
                try {

                    var date = parseXmlDate(datetime);
                    var datestring = '';
                    var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
                    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
                    var name = monthNames[parseInt(date.getMonth())];
                    datestring = date.getHours() + ':' + date.getMinutes() + ' ' + name + ' ' + date.getDate();
                    return datestring;
                } catch (e) {
                    return datetime;


, basic IF


Manual ajax is using Ext.Ajax.Request


JSON using Ext.decode ex: Ext.decode(response.responseText);

Select XML Nodes using :Ext.DomQuery.selectNode(‘Xpath’', XMLRawData); ex: Ext.DomQuery.selectNode(‘Xpath’', store.proxy.reader.xmlData);


You have Nested XML , with Many Childs. use Association on Model

use the Has Many, already working.

Ext.regModel('Order', {
        fields: [{ name: 'example'}],
        , hasMany: { model: 'product', name: 'products' }

This will Create Nested Store , there is store inside store, Bind it during the Store load callback or datachanged or what ever that is related.


Mapping is Xpath, so you could use ex:‘Root>Products>Product

for XML the Server Output Content Type Response must be : “text/xml” or “application/xml”

Mapping on XML is case sensitive

Read the API ,Property events related


To control the Proxy Parameters is using extraParams property. and set it before load of store

During Mapping to XML Attribute which is defined by ‘mapping:@AttributeName’ on Model, I found error ‘DOM Exception 12’ and this is solved by using  Patch

To override control UI , use the baseCLS

AddCLS will add the main class root, override with !Important

To theming use the recommended sencha way, Saas

To override a control to looks like another control use the baseCls

everything in Extjs is related and oop  , Hierarchal & Nested structure. think what you want for Layout Root inside of it Items inside Items can be other nested Layout,

whether root is panel,carouse,tab, inside of it could be HTML,Vbox,HBox.

Check out Sencha MVC with phonegap

Point of View:

“Looking at Phonegap and Future windows 8, Using Javasript You can create Native App, that is crazy, Javascript Could be the next Cross Platform language”


Share this post: | | | |
Posted by cipto with no comments