Closing a Parent form from a Child form

manjusree
Member Posts: 79
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
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
-
after posting the rec from the "child" window, you delete also the rec from the parent window :?:Do you make it right, it works too!0
-
Thanx for ur reply. But I don't want the Parent rec got deleted. Instead its status should be changed from 'Released' to 'Finished'. Is this possible?
Cheers,
Manjusree0 -
After the child form is booked call a function from the child in the parent window which has the purpose of closing the window.
You'll have to write the function yourself. If this does not work you could always put a different filter on the parent record.0 -
search the forum for CLOSe FormDo you make it right, it works too!0
-
Hi all,
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,
Manjusree0 -
Do you have a filter on the status? If so when NAV goes back to try to get the record from the database to modify it it won't be able to find it because it has been changed.
It will also mess up things like NEXT because the last record is no longer in the database.0 -
just an idea:
what if you put aFILTERGROUP(4); SETFILTER(STATUS,'%1|%2',STATUS::RELEASED,STATUS::FINISHED); FILTERGROUP(0);
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 why0 -
Thanking u all..Currently the parent form is filtered by status 'Released'. Is it that with FILTERGROUP(4) and subsequent filtering code, we can replace the default filter with "Released|Finished"?. I've tried using Filtergroups..but i'm afraid, still the error comes :oops:0
-
ok, then the "released" is not in the subformlink property of the subform, but it is a subformview in the header...
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...)0 -
yeah, you are right.. 'Released' is the 'SourceTableView' property of parent header. Parent's status should change on the button click of the child. I've written both the posting of child and change status of parent in 'OnPush' trigger of child's Post button.0
-
Actually I'm using Production order and Pick form. In this particular customization, I want the Production order status should be changed from Released to Finished on registering the Pick. I have written the code in "OnPush" trigger of Warehouse Pick->Register button.0
-
The real scenario is I have a 'Released' Production Order form as Parent. we can create Pick in the usual way and then we have Put-away/Pick lines->card. When i say child I mean this Pick form. Actual requirement is that on registering the Pick, the Production order status should change from Released to Finished. The error comes after posting, when we escape from 'Warehouse Pick Lines' form. Please find the screenshot attached.
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?
Thanx0 -
ok, now it's clear!
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 behaviour0 -
Thats the problem
. I can't change it. I want only the Released orders there.
0 -
oh... :-k
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 one0 -
Initially it was implemented like that. This one is a new reuirement since some users leave the form without changing the status to finished. So I just wanted to know if both can be done at a stretch.
Belias, thanx a lot for ur help.0 -
i mean to change the status automatically, but after closing the form:
- 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 codeunit0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions