if you are upgarding your organization from 2011 to 2013 you need you upgrade service reference from XRMServices/2007 to XRMServices/2011
service endpoint in organization/Discovery/soap end point service . Firstly update your javascript webresources.
Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"