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 :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Skipping validate write method for data source.

(0) ShareShare
ReportReport
Posted on by 229

Hi all,

What is the correct place to write the skipDatasourceValidateWrite method??

Actually I have a custom tab page, added to standard form(here SalesTable)

Where I am displaying data, which is actually not a particular record but I am displaying through a query by grouping records based on some fields and that table have some mandatory fields,

(These records actually shows the inventory information for the item in salesLine)

The table here is IntercompanyInventSum, where InventDimId(and few more fields), is mandatory, but I am grouping records from InventDim, based on site and warehouse, and creating Temp instance in this table, so InventDimId cannot have a particular value.

This tab page is only for viewing purpose, no write, edit or delete operations are to be performed, but when I click on save, It gives a warning - 'Field Dimension number' must be filled in'.......

Where Dimension number is nothing but InventDimId.

These validations are done in the ValidateWrite method, so I want to skip ValidateWrite call.

I tried calling skipDatasourceValidateWrite() from init of that dataSource, also AllowEdit, AllowCreate, AllowDelete......are set to 'NO'.

Any suggestions?

Thanks in advance,

Hardik

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Clearly your form is trying to write something if you get this error. You need to prevent the writing, not skip validations.

    Try removing super() call from write method of this data source (if you never use it for creating data).

  • HardikPatel523 Profile Picture
    229 on at

    Thank you for the quick response Nikolaos

    But here datasource is not a custom table, it is a standard table

    So we cant remove super() right(however super will be called because of chain of command)

    Any other way we can stop write method?

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    You can't prevent the standard code from being executed.

    Perhaps you need to design your extension in a different way so that you will not end up with trying to write something.

  • nmaenpaa Profile Picture
    101,166 Moderator on at

    Also, seems that you are not working with AX but Dynamics 365 Supply Chain Management so I will move this post to the corresponding forum.

  • HardikPatel523 Profile Picture
    229 on at

    No

    I am working with D365

    Finance and operations

  • nmaenpaa Profile Picture
    101,166 Moderator on at

    Yes, I noticed that. D365FO is split into two parts: D365 Finance, and D365 Supply Chain Management. Your question is clearly about the SCM part since you are dealing with sales orders.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 254

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 192 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 137 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans