53
Views
10
Comments
Solved
Soft Delete

Hello,

So I tried to do soft delete and it works fine. My question is that I want to do hard delete if the user deleted the English or Arabic version of the news,

 (What I did was that when user deletes English or Arabic version it only does soft delete to the deleted version only either it was Arabic or English and if the user decides to delete the other version it will delete using hard delete?)

Another question that I'm trying to Assign role to the user when creating one but it gives me this error although I assigned the id created for the role.

Thanks.

Giza Task.oap
2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello

I have Updated Your Logic, here we have used one filter in a aggregate on our delete /update server action,

and fetch the data that is been deleted, if there is some data then empty property will be false

else empty will be true, according to that I have created a Logic and deleted the record.

Updated Oml attached

I hope this helps

Best Rgegards

Tousif Khan

GizaTask_Updated_Delete.oml
2025-10-10 00-19-44
Bruno Rendeiro

Hy in the second question, are you creating data in the role user entity before create the user? 



UserImage.jpg
Mohamed Zakaria

I'm assigning the role to user while creating the user, I don't know if this is your question.

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

Hi Mohamed Zakaria ,

For second question you assign wrong UserID in assign role parameter.

here should be assign Created  UserId .

I update your oap file please check it.

Thanks

Giza Task_Updated.oap
UserImage.jpg
Mohamed Zakaria

That's worked for the second question thanks.

2023-10-21 19-42-11
Tousif Khan
Champion

Hello

As You have mentioned that you want to do hard delete, can you be more clear

1 If User deleted Arabic taking it as a example, so in that case do you want to delete it permanently or just sof t delete?

2) When one Language is deleted and if user delete another one as well, So in that Case what you want to do ?

Please let me know so that I'll answer it accordingly

UserImage.jpg
Mohamed Zakaria

Hello Tousif,

If the user deleted Arabic for example, I want it to be soft deleted and I already did that.

But when one language is deleted and if user delete another one as well I want to fully delete it from database (both Arabic and English).

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello

I have Updated Your Logic, here we have used one filter in a aggregate on our delete /update server action,

and fetch the data that is been deleted, if there is some data then empty property will be false

else empty will be true, according to that I have created a Logic and deleted the record.

Updated Oml attached

I hope this helps

Best Rgegards

Tousif Khan

GizaTask_Updated_Delete.oml
UserImage.jpg
Mohamed Zakaria

Hello,

Thanks a lot for your help it works fine now, but can you please explain to me what is this filter doing exactly?

Thanks

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Mohamed,

You ask 2 different questions in one. This makes the discussion very complicated, nor can you now mark replies for both questions as solution, if a solution is provided.

Please consider creating separate questions next time.

Regards,

Daniel

UserImage.jpg
Mohamed Zakaria

Hi Daniel,

I'm sorry for that, I will make sure to separate questions next time.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.