Notifications
Announcements
No record found.
How to page refresh after change any subgrid records or load
*This post is locked for comments
function onload()
{
setTimeout("SubGridRefresh();", 2500);
}
function SubGridRefresh()
var grid = document.getElementById("accountContactsGrid");
if (grid) {
grid.attachEvent("onrefresh", ReLoadForm);
function ReLoadForm()
window.location.reload(true);
This code is for ,get numeric attribute values from all records in subgrid and add them.
It execute in form onload and subgrid onchange also.
function updateTotalAmount() {
if(Xrm.Page.ui.getFormType()==2){
setTimeout(SubGridLoadWait, 1000);
function SubGridLoadWait()
var TotalAmount=0;
var array = [];
var gridControl = document.getElementById('accountContactsGrid').control;
var ids = gridControl.get_allRecordIds();
for (i = 0; i < ids.length; i++) {
var cellValue = gridControl.getCellValue('creditlimit', ids[i]);
var n=parseFloat(cellValue.toString().replace(/[^0-9-.]/g, " "));
TotalAmount=TotalAmount+n;
alert(TotalAmount);
function subgridOnload()
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2