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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Deleting Lines from a PO, soft delete vs actual delete

(0) ShareShare
ReportReport
Posted on by 50

To give a bit of background about my situation, we have some BYOD exports that include PO data. From there a Data Warehouse picks them up. For a particular PO, the Data Warehouse has 16 lines from the PurchLine table, the BYOD database has 7 records (one of which is marked isDeleted == Yes), and D365 has the same 7 records as the BYOD database (which we would expect). What this means is that at some point this PO had 16 lines and some have been deleted.

The part I am not able to understand (as a new FO developer without much actual experience using FO itself) is why some lines on the PO would be hard deleted and some would have been soft deleted. Logically I would think for a given PO that the behavior would be the same for all the lines, and I am struggling to explain to our reporting team why it is not.

I have the same question (0)
  • saurabh bharti Profile Picture
    15,039 Moderator on at

    Can you please explain what do you mean by soft and hard delete?

    Is it because you are removing lines at some state? lets say one line you add and remove even before confirmation or receipt or anything? another line you are removing after confirmation?

  • Alex VN Profile Picture
    1,994 on at

    Hi,

    I think in this case the PurchLine is soft delete is due to Purchase Order versioning that keep track of the version for the old PO. In this case if you have any kind of reporting you might add a fitler to field IsDeleted equal to No to get the actual PurchLine record.

    Reference: community.dynamics.com/.../261734

    Hope this helps.

  • ChosenSilver Profile Picture
    50 on at

    Soft delete means it sets the IsDeleted flag to Yes instead of actually deleting the record from the database

  • ChosenSilver Profile Picture
    50 on at

    Alex, I understand that the versioning is causing the records to be marked with isDeleted = Yes, but that is not my question. My question is why would some of the records be marked with isDeleted = Yes and why are some actually deleted from the database, all within the same PO. I can't understand why, for a single PO, some records are deleted and some are just marked as deleted.

  • Suggested answer
    ChosenSilver Profile Picture
    50 on at

    I was able to determine what is happening here. Lines that get deleted while the PO is in the initial Draft status are deleted from D365. Once the PO has been Confirmed, any lines that get deleted are instead marked as IsDeleted = Yes

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans