11
Views
3
Comments
What is mean by this error
Question

I am doing an upload of image. When I click the save button, It suppose to replace a pic of a database record that I set. But it turn up to have this problem

recruitment.oml

mvp_badge
MVP
Rank: #114

Hi Theow,

Which save button you are asking? The red one below the form or the white one which is on right side of the choose file option.

Also it will be good if you can share the oap file so that we also have your entitys to check. Right now you have just shared the oml of your web module which has broken depedency of recruitment_anf.

From the available information I assuming you are calling white save button to save image in PersonPhone entity and you are getting error because you are passing personid from input parameter which is not available in your screeen (see there is no person id in your querystring in browser url).

So in this case when person id is not available you should save id returned from CreateOrUpdatePerson and save it to patientid which you can then use in save photo.

Rank: #8589

I think this happen because I am creating a new person. So I can't upload the picture before the new candidates is created. Am I correct to say that. Is there a solution to this problem so that I can upload even if there is a new candidates. 

recruitment.oml

mvp_badge
MVP
Rank: #114

Hi Theow,

There is no point of having the image when its parent record does not exist. So you can do one thing that is while creating new person you should keep your image field within the form and on save you can save create person record first and then use its returned id to insert the image record in its respactive entity.