How do you use BeforeProcessChange DeltaChangeEventArgs.CanRemove in business processor

How do you prevent an update (delete) via business processors?

I found the CanRemove property in DeltaChangeEventArgs and specified that in my BP
if (e.DeltaChange.Type == RemObjects.DataAbstract.ChangeType.Delete)
{
int oldKey = (int)e.DeltaChange.OldValues[fieldnameKey];
if (recordIsRefernced(oldKey))
e.CanRemove=false;

However the record still got deleted

I searched for CanRemove in the .cs files in C:\Users\Public\Documents\RemObjects Samples\Data Abstract for .NET\C# but found nothing

I searched for CanRemove in the docs but I find a lot of irrelevant (non C# info)


What is the best way to learn what CanRemove does?

And back to my original question: What is the best way to prevent a DB modification using a server side business processor.

FYI: Meanwhile I found Business Processors which teaches me about blocking the modification but the CanRemove still is not clear to me

Hi,

you can just raise exception for blocking change in correspondent event.

CanRemove - remove or keep successful delta change. by default, we remove successful delta change for reducing network traffic.

read more at Updates article

Thanks, the documentation was indeed there,
It would be good however if I could filter the search results so it only shows .NET API, is that possible?

Hi,

it can do search on all pages only