Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9116309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:38:30+00:00 2026-06-17T04:38:30+00:00

I have created a html web resource that I am showing when a ribbon

  • 0

I have created a html web resource that I am showing when a ribbon button is clicked. On this popup I have a drop down list that I want to populate with a list of records that I have obtained using a fetchXml query.

My problem is that I have tried a few different ways to execute the query but it always comes back with errors. I’m guessing that the popup wont have the same range of functions that the parent form will have and so I will need to do something different to execute the query.

Currently I have it so that I have loaded an external script containing the functions needed to perform the fetch, but the code cannot see the CRM function of _HtmlEncode, and therefore fails.

Is there any way that I can get the popup to see the CRM functions? Or is there an alternate way of doing this?

EDIT: Some sample code

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:asp>
<head>
   <title>Re-Assign</title>
   <script type=text/javascript src="ClientGlobalContext.js.aspx"></script>

   <script type=text/javascript src="http://crm/DEVCRM/WebResources:ts_/scripts/fetch_global.js"></script>

   <script type=text/javascript>

   function OnLoad_GetAreasAndConsultants() {

       var fetchXml = '<fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0"><entity name="ts_solution_area"><attribute name="ts_solution_areaid"/><attribute name="ts_descriptor"/><attribute name="createdon"/> <order descending="false" attribute="ts_descriptor"/><filter type="and"><condition attribute="statecode" value="0" operator="eq"/></filter></entity></fetch>';
       var fetchedRecords = FetchRecordsToolKit.Fetch(fetchXml);

       if (fetchedRecords !== null) {

            var areaList = document.getElementById("ddl_solution_area")

            for (var i=0; i<fetchedRecords.length;i++) {

                var name = fetchedRecords[i].getValue("ts_descriptor");

                areaList.options[select.options.length] = new Option(name, i);
            }
        }
   }
</script>

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:38:32+00:00Added an answer on June 17, 2026 at 4:38 am

    I built something specifically for executing fetch within an HTML web resource.

    https://github.com/paul-way/JCL/blob/master/jcl.js

    Here’s an example of using it:

    var processProjectInfo = function (data) {
        if (data.length > 0) {
            // Set Project Header Information
            $('#ProjectTitle').html(data[0].attributes.new_name.value);
            $('#CompanyName').html(data[0].attributes.new_accountid.name);
        }
    };
    
    var loadProjectInfo = function (guid) {
        var fetchXML = " " +
            "<fetch mapping='logical' count='10'>" +
            "  <entity name='new_project'>" +
            "    <all-attributes/>" +
            "    <filter>" +
            "      <condition attribute='new_projectid' operator='eq' value='" + guid + "' />" +
            "    </filter>" +
            "  </entity>" +
            "</fetch>";
    
        JCL.Fetch(fetchXML, processProjectInfo);
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created web pages where am using pixel to position various html elements.
I have created a html page in php and upon submission i validates that
I have created a populated dropdown list in HTML. When the two dropdowns have
i have created a java project in eclipse,in this project i have an html
I have followed this guide: http://maven.apache.org/guides/plugin/guide-java-plugin-development.html I have created a maven-plugin project hello-maven-plugin with
I have created an Html 5 page that provides important server-side functionality. Unfortunately, it
I created in Eclipse dynamic web project, I have index.html in WEB-INF folder. I
I have a WCF web service called Palladium that is created as a project
This may be an incredibly stupid question, but I have a web application that
I have created a basic shape in HTML canvas element which works fine. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.