Open job journal from job card

dabba23
Member Posts: 77
Hey,
I need to open Job Journal from the Job Card.
I have already made a function in the job journal form with a parameter to take the Job No. when I run the Job Journal from the Job Card.
I then set a global variable equal to the parameter and on the trigger OnNewRecord I set Job No. equal to the global variable.
But how do I get it to set the filter for the Journal Template Name field in the job journal line.
Anyone tried this before?
Thanks Ann
I need to open Job Journal from the Job Card.
I have already made a function in the job journal form with a parameter to take the Job No. when I run the Job Journal from the Job Card.
I then set a global variable equal to the parameter and on the trigger OnNewRecord I set Job No. equal to the global variable.
But how do I get it to set the filter for the Journal Template Name field in the job journal line.
Anyone tried this before?
Thanks Ann
0
Comments
-
Turn on the debugger and open the Job Journal from the menu. There is some code in there that sets those filters, and from there you should be able to figure out how to set those filters in your own code.0
-
I realise I can use the code from the codeunit JobJnlManagement, but I am confused on how to also pass the Job No. over to the journal!
Able to guide me?
Thanks Ann0 -
I'd probably add the JobNo as a global of the form (let's say a Code20 variable called MyJobNo), and create a public function called 'SetJobNumber', with a code variable as a parameter, and pass the job number into the form that way.
SetJobNumber(parJobNo : Code[20]) MyJobNo := parJobNo;
and from there on out you can use the value of the MyJobNo variable throughout the form.
Does that make sense?0 -
Thats what I believe I wrote in my first post.
I have from the job card menu written this to pass on the job no:
JobJournalForm.SetJobNo("No.");
JobJournalForm.RUN;
This code will pass on the Job No. from the Job Card to the Job Journal.
But again, not sure how to combine this with the filters for the template.
Thanks Ann0 -
I guess I don't understand how you want to use the Job number in the filtering for templates. Maybe you should consider adding the template to the Job Card and get it from there.0
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