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

Skipping validate write method for data source.

(0) ShareShare
ReportReport
Posted on by 57

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,162 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).

  • Hardik__ Profile Picture
    57 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,162 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,162 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.

  • Hardik__ Profile Picture
    57 on at

    No

    I am working with D365

    Finance and operations

  • nmaenpaa Profile Picture
    101,162 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

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

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 301 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 120 Super User 2025 Season 2

#3
Siv Sagar Profile Picture

Siv Sagar 105 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans