locked
CURD Operations using JavaScript RRS feed

  • Question

  • Hi all,

    I am new to JavaScript.

    I tried to do CURD operations by following the MS CRM 2011 SDK.

    I completed it and now my point is

    In SDK, a html page is used to see the CURD operations.

    and i want these operations in the form of alerts and especially and particularly in retrieving record details...

    Can any one guide me regarding this....


    Pavan

    Tuesday, March 20, 2012 11:49 AM

Answers

  • Hey mate,

    I don't know what do you mean by javascript application. I don't know which crud operation file did you use.

    Add that javascript file in crm2011 as javascript webresource.

    Now add that webresource to the form and you can call the function on formload event, onsave event onchange event of any attribute on the form.

    You don't need a seperate html or silverlight application to make it work.

    there are 2 way to use crud operation in crm2011

    Rest/odata endpoints or soap services.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    Tuesday, March 20, 2012 12:47 PM

All replies

  • Hi Pavan

    The CRM OData service is a  WCF services. OData has a REST endpoint,
    is limited to CRUD and can only be used in client applications (i.e. JScript or

    Silverlight within CRM 2011).

    Please find few links about odata

    http://www.toplinestrategies.com/dotneters/technology/microsoft-crm-2011-odata-examples/?lang=en

    http://crmscape.blogspot.com/2011/03/crm-2011-odata-json-and-crm-forms.html


    there is a odata query Designer by Rhett Clinton’s

    Its the  easiest way to generate these queries. His tool can be found at
    the link below.

    http://crm2011odatatool.codeplex.com/


    hth

    dkay

     --------------------------------------------------------------------------------
     If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".

    Tuesday, March 20, 2012 12:01 PM
  • Hi

    From your answer, i came to know that,

    If we want to do such kind of CURD operations using javascript, then we must use either Silverlight or javascript applications to see these operations visually and can't see in form of alerts...

    Am i Correct regarding this...?


    Pavan

    Tuesday, March 20, 2012 12:28 PM
  • Hey mate,

    I don't know what do you mean by javascript application. I don't know which crud operation file did you use.

    Add that javascript file in crm2011 as javascript webresource.

    Now add that webresource to the form and you can call the function on formload event, onsave event onchange event of any attribute on the form.

    You don't need a seperate html or silverlight application to make it work.

    there are 2 way to use crud operation in crm2011

    Rest/odata endpoints or soap services.

    I hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com

    Tuesday, March 20, 2012 12:47 PM
  • Hi Pavan, 

    instead of using the SDK samples, try the CrmRestKit. The basic CRUD operations are supported and the API is quite simple. 

    http://crmrestkit.codeplex.com/

    Or us another framework (e.g.: XrmServiceToolkit: http://xrmservicetoolkit.codeplex.com/)


    Daniel


    • Edited by thuld Wednesday, March 21, 2012 6:42 AM
    Tuesday, March 20, 2012 1:30 PM
  • Hi

    Did this help?

    Please make sure to mark as answer to the response that helped you get through. This will help others with similar problem identify the answer and also close this thread as resolved.

    Thanks

    Dkay

    Wednesday, March 21, 2012 9:24 AM