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: $ is not a function</Message> <Line>35</Line> <URL>/%7B636672668970000751%7D/WebResources/aos_/forms/familyConnectionManager/addFamilyConnection.html?Data=%7b%22studentId%22%3a%2250F1196A-11C9-E711-A824-000D3AE0B82E%22%7d</URL> <PageURL>/%7B636672668970000751%7D/WebResources/aos_/forms/familyConnectionManager/addFamilyConnection.html?Data=%7b%22studentId%22%3a%2250F1196A-11C9-E711-A824-000D3AE0B82E%22%7d</PageURL> <Function>anonymousr:$isnotafunction</Function> <FunctionRaw>TypeError: $ is not a function</FunctionRaw> <CallStack> <Function>anonymousr:$isnotafunction</Function> </CallStack> </ScriptErrorDetails> <ClientInformation> <BrowserUserAgent>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/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:03: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