Create record with jscript without using ClientGlobalContext.js.aspx RRS feed

  • Question

  • Hello everyone, I want to create a record using jscript without having to publish the html file and referencing the ClientGlobalContext.js.aspx jscript file. I am sure there is a way to do this but I can't find an example. Everything seems to require you to create a web resource. I have a website already that is hosted else where. I have all the code required to do what I need except whatever the clientglobalcontext is doing. I'm assuming it's declaring the serverUrl. So my question is can I bypass this "GetGlobalContext" and just declare the serverurl myself and whatever other information it needs to create a record from a button click from a webpage where the html file isn't published as a webresource.


    Wednesday, March 19, 2014 3:20 PM


All replies

  • I was able to solve the problem above, but now a new problem presents itself. Because the crm server is secure I can't send requests to the server without providing credentials. A person visiting out website and filling out a lead wouldn't have credentials but it would be nice if when the fill out their information and click a button a record is created in the CRM. This all works great minus the fact I have to provide my login information each time. Is there a way around this without posing security issues to our system?

    Thanks again,

    Wednesday, March 19, 2014 8:29 PM
  • Hi,

    If you have a public facing website that needs to create information in CRM then the public website should post information to the server and then the server communicate with CRM. When you are accessing CRM via the Server you use the SDK web services and have to provide credentials (unless you have Kerberos enabled and the Application pool is running under a CRM user account) - this is ok though because you can store the user credentials securely on the server - see http://blogs.msdn.com/b/crminthefield/archive/2011/05/18/how-to-create-a-simple-webpage-leveraging-the-crm-2011-iorganizationservice-web-service.aspx

    Hope this helps,


    Scott Durow
    Blog www.develop1.net    Follow Me
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, March 19, 2014 9:09 PM
  • Awesome, thanks for your help.
    Thursday, March 20, 2014 1:54 PM