21
Views
9
Comments
Solved
Foreign key is saving double attributes in the DB
Question
Application Type
Mobile

Hello people ,  i have a plugin called SignaturePad for signing. I have a entity called Signature the forgein key of this  entity is in Gegevens entity.  This signature pad has his own button to save it "done"


and i have the "Afronden" button to save it to Gegevens entity where the FK of Signature is


i tried this and it works partly. Now when i sign and click on "done", it saves an entity into Signature wich is good. But i want it to save it also in the Gegevens entity, that is why a have the button "Afronden", But when you click done and after that you click "Afronden", it saves a empty record into Gegevens.SignatureId and in Signature.


And in Gegevens.SignatureId it ofcourse only saves that when after "Afronden" is clicked (ID 27)



Afronden action: 


Opslaan: 


Rank: #69
Solution

This assign appears to be missing from the Client Action CaptureSignatureBlockSignatureUpdate


Rank: #69

Hi Samed, 

The Opslaan action is probably getting an empty record for Signature, when clicked on Afronden then a new record is created in the database. 

Try to validate this with a debug.

Rank: #6907

Hi @Huarlem Lima, yes i did debug it, the Opslaan gets a SignatureId of "0", but i tried so many things to fix this but without succes. What can i do about this? 

Rank: #69

I would need to look at your implementation to better suggest a solution, but try

  1. Set the SignatureId2 variable after being created in the Done action.
  2. Use a Refresh Data in the Afronden action before the Opslaan action Call


Rank: #69
Solution

This assign appears to be missing from the Client Action CaptureSignatureBlockSignatureUpdate


Rank: #609

Hi Samed,

Is it possible to share the OML, so we can track the issue

Regards,

Krushna


Rank: #6907

Hi @Krushana Mantri , please have a look on the reply on huarlem

Rank: #609

Hi Samed, I am not able to see the CreateOrUpdate Signature flow in attached oml

Rank: #609

Hi,

As per my understanding, 

You should send the actual signature id to the AnvraagDetailbeveillegar screen instead of Nullidentifier() , get the Signature by that id, and send that record to Opslaan action , because of null identifier from the aggregate it is returning null record only and that is saving in null data in Signature entity

hope that will help you

Rank: #6907

Hi, but the SignatureId2 input is sending the Id right? The aggreagate has a filter 

SignatureId2 = Signature.Id

So where is the nullidentifier?


Thank you