Hi all
I have this java script code
function accountOnload() {
//debugger;
var objSubGrid = Xrm.Page.getControl("OrderProduct");
var AccountName = Xrm.Page.getAttribute('name').getValue();
var currentleadId = Xrm.Page.data.entity.getId();;
var contactFetchXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"+
"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"+
" <entity name='salesorderdetail'>"+
" <attribute name='productid' />"+
" <attribute name='priceperunit' />"+
" <attribute name='quantity' />"+
" <attribute name='extendedamount' />"+
" <attribute name='salesorderdetailid' />"+
" <attribute name='manualdiscountamount' />"+
" <order attribute='productid' descending='false' />"+
" <link-entity name='salesorder' from='salesorderid' to='salesorderid' alias='ay' link-type='inner'>"+
" <link-entity name='account' from='accountid' to='customerid' alias='az' link-type='inner'>"+
" <filter type='and'>"+
" <condition attribute='accountid' operator='eq' uiname='"+AccountName+"' uitype='account' value='"+currentleadId+"' />"+
" </filter>"+
" </link-entity>"+
" </link-entity>"+
" </entity>"
"</fetch>"
var contactRecords = XrmServiceToolkit.Soap.Fetch(contactFetchXML);
if (contactRecords.length > 0)
{
if (contactRecords[0].attributes.extendedamount!= undefined)
{
//alert(contactRecords[0].attributes.extendedamount.value);
var ex = contactRecords[0].attributes.extendedamount.value ;
//objSubGrid.control.SetParameter('fetchXml', FetchXml);
//Xrm.Page.getAttribute("extendedamount").setValue(ex);
//Xrm.Page.getAttribute("extendedamount").setValue(contactRecords[0].attributes.extendedamount.value);
//Xrm.Page.getAttribute("extendedamount").setValue('a')
}
}
}
I have my desired result in a variable contactRecords
I have HTML
<html><head><!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="maxcdn.bootstrapcdn.com/.../bootstrap.min.css">
<!-- jQuery library -->
<script src="ajax.googleapis.com/.../jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="maxcdn.bootstrapcdn.com/.../bootstrap.min.js"></script><meta><meta></head>
<body style="word-wrap: break-word;">
<div class="container">
<!--<h2>Basic Table</h2>-->
<!--<p>The .table class adds basic styling (light padding and only horizontal dividers) to a table:</p>-->
<table class="table">
<thead>
<tr>
<th>Product ID</th>
<th>Product Name</th>
<th>Price per unit</th>
<th>Quantity</th>
<th>Discount</th>
<th>Total Amount</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</body></html>
I want to bind this java script variable contactRecords to this bootstrap table.
Is there any way?