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 55

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

  • nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Skipping validate write method for data source.

    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.

  • Hardik__ Profile Picture
    55 on at
    RE: Skipping validate write method for data source.

    No

    I am working with D365

    Finance and operations

  • nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Skipping validate write method for data source.

    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.

  • Suggested answer
    nmaenpaa Profile Picture
    101,156 Moderator on at
    RE: Skipping validate write method for data source.

    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.

  • Hardik__ Profile Picture
    55 on at
    RE: Skipping validate write method for data source.

    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,156 Moderator on at
    RE: Skipping validate write method for data source.

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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans