Hi all
I want to get records in my configuration page which is my .HTML page. What is the best way to do this in crm 2016.
Thank You
*This post is locked for comments
Hi all
I want to get records in my configuration page which is my .HTML page. What is the best way to do this in crm 2016.
Thank You
*This post is locked for comments
I've built a tool which you can install into your organization to help build Odata queries such as this and will figure out the proper casing for elements in the request: https://github.com/jlattimer/CRMRESTBuilder/releases
Hi Charmis Varghese
Where did you this "information If the case is not correct, you get HTTP 500 error."? Your answer works for me.
Thank You
Hi Abdul,
Can you try "WebResourceSet" instead of "webresourceset"?
If the case is not correct, you get HTTP 500 error.
Regards,
Charmis
Hi all
I am using this code and at contactRequest.status. it is giving me 500. I do not Where am I wrong.? Please help me to solve the issue.
function ShowConfiguration() {
debugger;
var serverUrl = window.parent.Xrm.Page.context.getClientUrl();
var oDataEndpointUrl = serverUrl + "/XRMServices/2011/OrganizationData.svc/";
//var query = "axp_mc_templateSet?$top=1";
var query = "webresourceset?$select=name&$filter=name eq 'apikey'";
oDataEndpointUrl += query;
var contactRequest = new XMLHttpRequest();
//contactRequest.open("GET", ODataPath + "/ContactSet(guid'" + contactId + "')", false);
contactRequest.open("GET", oDataEndpointUrl, false);
contactRequest.setRequestHeader("Accept", "application/json");
contactRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8");
contactRequest.send();
if(contactRequest.status == 200)
{
var retrievedTemplate = JSON.parse(contactRequest.responseText).d;
var retrievedTemplateRecord = retrievedTemplate.results[0];
}
else
{
//console.log('request failed.');
//Xrm.Page.getAttribute('cobalt_contactsemail').setValue("---No Contact Found---");
}
}
Thank You
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156