I'm trying to get editable subgrid record to perform some calculation using javascript..
my javascript code:
always showing getGrid is null.. any suggessions....
I'm trying to get editable subgrid record to perform some calculation using javascript..
my javascript code:
always showing getGrid is null.. any suggessions....
tried with that as well.. but didn't work..
i changed unique name of subgrid also and tried... that also didn't work...
Hi,
Found the issue.
Try to select Display label on the Form checkbox on sub grid properties. it will work
i used on save of subgrid..
my subgrid unique name is "Subgrid_2"... i give that as a parameter.. but why it i returning null..? should i change the subgrid name anything else?
Hi,
On which event you have attached your code?
I just checked your code on my trial on Account entity Contact sugrid and see result below .
function Demerits(executionContext) {
//subgrid unique name : "Contacts"
var formContext = executionContext.getFormContext();
var gridContext = formContext.getControl("Contacts");
var count = gridContext.getGrid().getTotalRecordCount();
console.log("Total Questions:"+count);
console.table("Total Questions:"+count);
alert("Total Questions:"+count);
}
Form - Onload -> getTotalRecordCount() - Returns zero
Form - OnSave -> getTotalRecordCount - Returns exact number of count
Sugbrid OnChange -> getTotalRecordCount - Returns exact number of count
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156