31
Views
14
Comments
Solved
Why after I delete one to one entity in outsystem I cannot save data anymore
Question
Application Type
Reactive

Can you guys help me on how I can save new data

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

The assignment over here: on an Edit profile page On Save button I have added this.


Thanks


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

Hello
The information you have shared is not sufficient to demonstrate your issue and answer this, with this information it leads to several questions, I suggest updating your Post with all the information with the scenario and what you want to achieve if you can add some snapshots and Oml that would add more information and it would be understandable.

Have you deleted the Parent Entity ?
I guess you have some logic created based on your other entity, or there might be some issue in your logic flow.

To save anything to database Entity you need to perform Create or Update Operation,
Based on your data an entry will be either created or updated to your Entity.

Thanks

UserImage.jpg
Jhanna Mae Hicana

But before I delete the parent entity it was working and saving fine

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

If you delete the parent entity then, there there is no point you can create a one-to-one relationship. 

Can you please elaborate the issue?

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

I have checked your oml, so I found that you are not passing the Identifier of Person to the server action of personal information
Add the assign and assign the value to it as shown in snapshot.


I have also updated your Oml it will work now

https://drive.google.com/file/d/1fic7nWHc0kGlmdKk9Wig2oJXnFYU79vr/view?usp=drivesdk

I hope this helps

Best Regards 

Tousif Khan

UserImage.jpg
Kay Lun

Hello @Diana Gli 

Could you provide more information or maybe even the oml file so we could inspect your issue and provide any possible solutions.


Thanks

UserImage.jpg
Jhanna Mae Hicana
UserImage.jpg
Kay Lun


Opened your oml file, may I know where's the problem that you're facing to?

If you could describe what exactly you're trying to do and the bottleneck then it will be easier to narrow the problem :)

cuz I cannot publish the module on my environment to test the result

UserImage.jpg
Jhanna Mae Hicana

I try to delete all personal information exist in the personal entity after that personal data saves but contact and work exp doesn't 

UserImage.jpg
Kay Lun


Hi Diana,

Because you have set the Delete Rule of Contact and Work exp to Protect (refer to below images). So all the Contact and Work exp won't be deleted even the parent entity was deleted. You need to change the Delete Rule to Delete to solve your problem. Hope this could help.



Bonus:

You could have a look on this document which will tell you more about how the Delete Rule work in OS, cheers.

https://success.outsystems.com/documentation/11/developing_an_application/use_data/data_modeling/entity_relationships/delete_rules/


UserImage.jpg
Jhanna Mae Hicana

Good Day I have already change the delete rule and deleted those data successfully, however when I start saving new data again it doesn't save to the database idk why can I please explain these to me.



Regards,

Diana Gli

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


I have already updated the same information above @Diana Gli , you can check also I have updated your Oml , the part that was missing in your File I have added the assign

https://drive.google.com/file/d/1fic7nWHc0kGlmdKk9Wig2oJXnFYU79vr/view?usp=drivesdk

UserImage.jpg
Kay Lun

Hi Diana,

Not sure how you implement the logic, but I suggest you to check have you change the action from UpdateContacts to CreateOrUpdateContacts. And also need to pass the Personal Information Identifier, or if this is not the issue, you could provide some screenshot of your logic so we could know how to help to solve :)

Thanks

UserImage.jpg
Jhanna Mae Hicana

Which part did you change can you elaborate it. I'll appreciate it alot.


Regards, 

Diana Gli

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

The assignment over here: on an Edit profile page On Save button I have added this.


Thanks


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