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

Announcements

No record found.

News and Announcements icon
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

  • Suggested answer
    Rui Carvalho Profile Picture
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 89 Most Valuable Professional

#2
11manish Profile Picture

11manish 69 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 45

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans