#135958 - 11/20/06 09:56 AM
Delete records in forms
|
Stealth Member
Registered: 08/22/06
Posts: 37
|
Hi All,
Another question for today.
Requirement: a)Form B is called from Form A [Both forms in new mode]. b)User fills up form A and before saving it, calls Form B and saves form B. c)After user saves Form B, he is returned to Form A but does not save form A. (He just simply closes the window) d)At this point, all form B records linked to a particular Form A record must be deleted.
Can anyone advise how this can be achieved?
We tried deleting all Form B records upon 'Window Close/Undisplay' of Form A (we set some temp field on 'Submit' and if that temp field is $NULL$ on Window Close, we delete Form B records) but even if the user selects 'No' in the warning 'Your changes have not been saved or sent..Do you want to close the Form A window?', the Form B records are still deleted.
Thanks Aravind
|
|
Top
|
|
|
|
|
#135962 - 11/20/06 10:45 PM
Re: Delete records in forms
[Re: remedybuff]
|
Stealth Member
Registered: 08/22/06
Posts: 37
|
I am opening Form B in dialog. The user clicks on a button 'Save' in form B and the form B record gets saved in the DB and the control is returned to the Form A.
If we return to Form A without saving Form B data, then the Form B data that the user enters is lost.
The question is how to delete the Form B record if user does not save Form A.
|
|
Top
|
|
|
|
|
#135973 - 11/21/06 10:30 AM
Re: Delete records in forms
[Re: Mlevy]
|
Stealth Member
Registered: 08/22/06
Posts: 37
|
if both form A and form B are totally unrelated and are two separate pieces of information, and you cannot push fields to form A, then you can commit the changes in form B only after the user clicks 'save' in form A. Can you explain how this can be done? If you dont save the Form B data then-and-there (i.e. while in dialog mode), then where will the system retain the Form B data after the form B dialog closes in order to commit later? You had an escalation to the Form B
Al night or time you need you check on the form B all the records that have a GUID ! NULL and a Form A Request ID Field = NULL (that mean that you have created records on form B and the form A have not been saved)and you delete all the records on the form B Yes, we had thought of escalations but we cannot have any zombie record hovering till the escalation deletes it (in case the escalation is scheduled to run at midnight). Also, running the escalation every few minutes is not recommended from a performance perspective.
|
|
Top
|
|
|
|
|
#135976 - 11/21/06 12:24 PM
Re: Delete records in forms
[Re: remedybuff]
|
Stealth Member
Registered: 08/22/06
Posts: 37
|
Anuj,
I got your point.
But the question is how do you delete form B record when the user DOES NOT save form A record. (Using escalations is ruled out)
NOTE: Form B data cannot be duplicated in Form A
|
|
Top
|
|
|
|
|
#135982 - 11/21/06 11:08 PM
Re: Delete records in forms
[Re: remedybuff]
|
Stealth Member
Registered: 08/22/06
Posts: 37
|
Currently how exactly are you linking form A with form B?? (you cannot link them by request ID as form A does not have a request ID until it is saved)
Are you linking them using GUID?
We are using a DB procedure which generates a new ID everytime. We are calling this the moment a user opens up the record in new mode. This is the connecting factor b/w Form A and Form B. Would like to make these things clear: * Its out of question to push all fields from Form B to Form A. If this was possible, there would be no need for having a seperate form, we could have as well captured all data in Form A itself. * We are on 5.1.2. hence Audit feature is not available.
|
|
Top
|
|
|
|
|
#135989 - 11/22/06 07:01 AM
Re: Delete records in forms
[Re: Vincent_RIEDWEG]
|
Stealth Member
Registered: 08/22/06
Posts: 37
|
I think we are digressing from the topic.
The problem is not in linking Form A and Form B (either using GUID or anything else); the problem is in deleting Form B record if Form A is not saved, without using escalations or Audit (not avlbl in 5.1.2).
Thanks.
|
|
Top
|
|
|
|
|
#136045 - 11/28/06 08:46 AM
Re: Delete records in forms
[Re: aravind]
|
Stealth Member
Registered: 08/22/06
Posts: 37
|
Putting this question in another way, is there any way to capture whether the user has clicked on 'Yes' or 'No' in the dialog - 'The changes you've made to XXX form have not been saved. Do you wish to close the window' ??
|
|
Top
|
|
|
|
|
|
|