Hi all,
How can we close the parent form from a child form?..I want to change the status of the parent form from 'Released' to 'Finished' just after posting the child form. All the routine works fine, but the problem comes while i close the child form. The system tries to find out the 'Released' parent record which no longer exists and so it displays error.
Any knid of help would be apreciated.
Cheers,
Manjusree
0
Comments
Cheers,
Manjusree
You'll have to write the function yourself. If this does not work you could always put a different filter on the parent record.
|To-Increase|
Thx for the replies. When I delete the Parent Rec, it works quite fine. But if i try to change the Parent rec status instead of deleting it, the error comes. I don't think that Timer method/single instance code unit method will do something since i'm not using RUNMODAL to open the Child form.
The status of Parent while opening the Child is 'Released' and after posting the Child, Parent's status should be 'Finished'. Is there any method to exit the child without going back searching for the 'Released' parent???
Regards,
Manjusree
It will also mess up things like NEXT because the last record is no longer in the database.
My Blog - nav.education
what if you put a before your posting routine?I think this should avoid the subformlink property.
I've never tried this, but i'm really curious to see if it works.
N.B.: You must use filtergroup No. 4: see the online help for more info, if you don't know why
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
in this case, my code is useless #-o
then, where is the code that updates the status of the parent rec?(under a button, within a function...)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
can you post a screenshot of your form please?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Is there any method by which we can just skip from the Pick form so that the system won't go back searching the Prod. order?
Thanx
I can imagine these 2 methods:
a) the simpler, is to change the subformview of the released production order form, from released to released|finished
b) create a new form (a copy of released production order), with subformview released|finished: this is better than 1.a because you don't modify standard behaviour
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
try to change with SaveTableView and SourceTablePlacement properties
EDIT: i don't think it will work...instead, a simple solution came in my mind: why don't you "finish" the order the order after closing the pick form?i mean: you post, you close the form, you get back to production order form and then you "finish" it!
in this way, the record will go out of scope and "disappear" from the form, moving the user to the next one
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Belias, thanx a lot for ur help.
- use a single instance codeunit: here you have a function where you store the an array of no. of the orders to "finish" just after the pick posting.
when you get back to the production order form (or when you close it) you retrieve the no. or numbers from the SI codeunit and you "finish" them. after that, be sure to clear the values in the SI codeunit
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog