Hi All,
Im getting a javascript error which runs fine on the old web interface but not on Sales Hub interface. The function runs on SAVE of form.
What can be the possible issue? Are some of the Javascript functions not supported for the new interface or any other reason?
Here is the code:
function GetGridValues()
{
var rowData;
var entity;
var attribute;
var sum=0;
var i=0;
var qty;
var manual;
manual = Xrm.Page.getAttribute("new_manuallyenterestrevenue").getValue();
if(manual==0)
{
var filteredRecordCount = Xrm.Page.getControl("FeeEstimator").getGrid().getTotalRecordCount();
for( i=0; i<filteredRecordCount ; i++)
{
rowData = Xrm.Page.getControl("FeeEstimator").getGrid().getRows().get(i).getData();
entity = rowData.getEntity();
attribute = entity.getAttributes();
qty= attribute.get("new_totalsalesprice").getValue();
sum=qty+sum;
}
Xrm.Page.getAttribute("estimatedvalue").setValue(sum);
}
}
Here is the error:
GetGridValues@test.crm4.dynamics.com/.../new_RoleAllocationTotal:18:29
DPXt/fo</e.prototype.executeFunction@test.crm4.dynamics.com/.../app.js
DPXt/fo</e.prototype.execute@test.crm4.dynamics.com/.../app.js
DPXt/co</e.prototype._executeIndividualEvent@test.crm4.dynamics.com/.../app.js
DPXt/co</e.prototype._executeEventHandler@test.crm4.dynamics.com/.../app.js
execute@test.crm4.dynamics.com/.../app.js
DPXt/wo</e.prototype._executeSyncAction@test.crm4.dynamics.com/.../app.js
DPXt/wo</e.prototype._executeSync@test.crm4.dynamics.com/.../app.js
DPXt/wo</e.prototype.executeAction@test.crm4.dynamics.com/.../app.js
Po/</</</t.dispatch@test.crm4.dynamics.com/.../app.js
boot/a</o</</n.dispatch</<@test.crm4.dynamics.com/.../app.js
dispatch@test.crm4.dynamics.com/.../app.js
dispatch@test.crm4.dynamics.com/.../app.js
et/</</</</<@test.crm4.dynamics.com/.../0.js
et/</</</<@test.crm4.dynamics.com/.../0.js