web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to make a sub grid fields editable and required

(0) ShareShare
ReportReport
Posted on by 15

Hi,

On the invoice form, there is a invoicedetail subgrid and few fields are enabled and required like the quantity.

I have created a new column and added to the subgrid but it's only in display mode.

I would like to make it editable and required.

I was exploring the subgrid properites and I found nothing interesting.

Then I tried using javascript but it doesn't work

var invoiceSubGrid = formContext.getControl("invoicedetailsGrid").getGrid();
var gridRows = invoiceSubGrid.getRows();
gridRows.forEach(function (row, i)
{
    var gridColumns = row.getData().getEntity().attributes;
    gridColumns.forEach(function(column, j) {
        varatrName = column.getName();
        varatrValue = column.getValue();
        column.setDisabled(false);
        column.setRequiredLevel("required");
    });
});

Thanks in advance

I have the same question (0)
  • Suggested answer
    Rui Carvalho Profile Picture
    on at

    Hi,

    For Editable Sub-Grids please see the following documentation: docs.microsoft.com/.../use-editable-grids

    Under this:

    pastedimage1624267352969v1.png

    For field as required please see the following documentation: Create and edit fields with Dynamics 365 Customer Engagement (on-premises) | Microsoft Docs

    You will have 'Field Requirement'. You need to set the field as 'Business Required'

  • vnussbaum Profile Picture
    15 on at

    By default, the invoicedetail control was read only but you can modify the quantity.

    I tried to add the editable grib control and my custom field is still not editable. If I set it to required, the field is locked and I get the error message telling the field is required.

    I just tried as business required, something changed.

    Maybe it's a limitation for this specific table

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans