Question
How access all items in the detail list on Freedom UI Page
10:23 Oct 26, 2024
Hi!
I'm trying to get all items in my detail list on freedom ui in the handler: "crt.SaveRecordRequest".
When enter in this handler, I need to read the values from an especific field from all items in the detail (In the image below you can see the field).
How can I access all items?
Like
2 comments
12:59 Oct 28, 2024
Hello,
Here is the example of a handler where I read all values displayed in the list of contacts on the account form page:
{
request: 'crt.SaveRecordsRequest',
handler: async(request, next) => {
if (request.itemsAttributeName == "GridDetail_9ib3s20"
) {
const gridDetail = await request.$context.GridDetail_9ib3s20;
let nameColumnValues = [];
gridDetail.forEach((item) => {
nameColumnValues.push(item.GridDetail_9ib3s20DS_Name.__zone_symbol__value);
});
console.log(nameColumnValues);
}
return next?.handle(request);
}
}
GridDetail_9ib3s20 - is the attribute name for my test list.
As a result the array of names was logged in the console:
So you can try the same approach on your end.
Show all comments