Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

New version (9.0.2.751) introduces error with WebResource with Handlebars

Posted on by

Hi all,

I had a working web resource using some handlebars templates last week. Over the weekend, CRM updated to (9.0.2.751) and the web resource no longer works. I believe it is an error in the way the handlebar template is being parsed, but I can't confirm.

Here is the generated CrmScriptErrorReport

<CrmScriptErrorReport>
  <ReportVersion>1.0</ReportVersion>
  <ScriptErrorDetails>
   <Message>Uncaught TypeError&#58; &#36; is not a function</Message>
   <Line>35</Line>
   <URL>&#47;&#37;7B636672668970000751&#37;7D&#47;WebResources&#47;aos_&#47;forms&#47;familyConnectionManager&#47;addFamilyConnection.html&#63;Data&#61;&#37;7b&#37;22studentId&#37;22&#37;3a&#37;2250F1196A-11C9-E711-A824-000D3AE0B82E&#37;22&#37;7d</URL>
   <PageURL>&#47;&#37;7B636672668970000751&#37;7D&#47;WebResources&#47;aos_&#47;forms&#47;familyConnectionManager&#47;addFamilyConnection.html&#63;Data&#61;&#37;7b&#37;22studentId&#37;22&#37;3a&#37;2250F1196A-11C9-E711-A824-000D3AE0B82E&#37;22&#37;7d</PageURL>
   <Function>anonymousr&#58;&#36;isnotafunction</Function>
   <FunctionRaw>TypeError&#58; &#36; is not a function</FunctionRaw>
   <CallStack>
    <Function>anonymousr&#58;&#36;isnotafunction</Function>
   </CallStack>
  </ScriptErrorDetails>
  <ClientInformation>
   <BrowserUserAgent>Mozilla&#47;5.0 &#40;Windows NT 10.0&#59; Win64&#59; x64&#41; AppleWebKit&#47;537.36 &#40;KHTML, like Gecko&#41; Chrome&#47;67.0.3396.99 Safari&#47;537.36</BrowserUserAgent>
   <BrowserLanguage>undefined</BrowserLanguage>
   <SystemLanguage>undefined</SystemLanguage>
   <UserLanguage>undefined</UserLanguage>
   <ScreenResolution>1920x1080</ScreenResolution>
   <ClientName>Web</ClientName>
   <ClienState>Online</ClienState>
   <ClientTime>2018-07-17T11&#58;03&#58;15</ClientTime>
  </ClientInformation>
</CrmScriptErrorReport>

The report states that there is an error on line 35 of addFamilyConnection.html. Here is surrounding section. It is a handlebars template

The line in red is line 35

  <script id="page-select" type="text/x-handlebars-template">
    <div id="family-panel" class="panel panel-default aos-dynamic">
      <div class="panel-heading">
        <h3 class="panel-title">{{family-title}}</h3>
      </div>
      <div class="panel-body">
        {{#isEqual family.length 0}}
          <span>{{no-family}}</span>
        {{else}}
          <label for="select-contact">{{family-selection-label}}</label>
          <select id="select-contact" class="form-control">
            {{#each family}}
            <option value="{{contactid}}"
                    data-firstname="{{firstname}}"
                    data-lastname="{{lastname}}">
              {{firstname}} {{lastname}}
            </option>
            {{/each}}
          </select>
          <div class="input-group aos-input-group">
            <button id="select-direct" class="btn btn-primary">
              <span class="glyphicon glyphicon-arrow-right"></span>
              {{family-button}}
            </button>
          </div>
        {{/isEqual}}
      </div>
    </div>
    <div id="search-panel" class="panel panel-default aos-dynamic">
      <div class="panel-heading">
        <h3 class="panel-title">{{search-title}}</h3>
      </div>
      <div class="panel-body">
        <div class="input-group aos-input-group">
          <label for="contact-search">{{search-term-label}}</label>
          <input type="text" class="form-control" id="contact-search" />
        </div>
        <div class="input-group aos-input-group">
          <button id="select-alternate" class="btn btn-primary">
            <span class="glyphicon glyphicon-search"></span>
            {{search-button}}
          </button>
        </div>
        <div class="input-group aos-input-group">
          <div class="alert alert-warning" id="search-validation" style='display:none;'>
            <span class='glyphicon glyphicon-info-sign'></span>
            <span></span>
          </div>
        </div>
      </div>
    </div>
  </script>

This web resource was working in the prior release of Dynamics

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans