Code for Job Queue

rico1931
Member Posts: 295
Hi Everyone,
We have a job queue that runs every night for the planning report. We noticed that it was only checking things that were set to Items = Prob. Order for the replenishment system. I tried adding this over line to make it the following
When it was only the first line, everything worked fine. Ever since I added the 2nd line, things have been hit or miss. I'm wondering if there is a nice clean way to add everything to 1 line or if I'm missing something here.
Thank you
We have a job queue that runs every night for the planning report. We noticed that it was only checking things that were set to Items = Prob. Order for the replenishment system. I tried adding this over line to make it the following
ItemReplSystem := Item."Replenishment System"::"Prod. Order"; ItemReplSystem := Item."Replenishment System"::Assembly;
When it was only the first line, everything worked fine. Ever since I added the 2nd line, things have been hit or miss. I'm wondering if there is a nice clean way to add everything to 1 line or if I'm missing something here.
Thank you
-rico1931
0
Answers
-
What are you trying to do here? Set the ItemReplSystem variable to what the replenishment system is on the item record? Or is it a Boolean variable that you want to set to true if the replenishment system is Prod. Order OR Assembly?Rob Hansen
http://www.epimatic.com0 -
Rob Hansen wrote:What are you trying to do here? Set the ItemReplSystem variable to what the replenishment system is on the item record? Or is it a Boolean variable that you want to set to true if the replenishment system is Prod. Order OR Assembly?
Hi Rob,
Just trying to set the ItemReplSystem variable to BOTH Prod. Order; Assembly
-rico19310 -
You cannot assign 2 values to one variable at the same time.
You can create another variable, assign the other value and then use both the variables in your filters or conditions.0 -
I think this is a case where you're probably going about something the wrong way. If you're trying to adapt this process to run under the job queue, your code needs to apply a similar filter to the Item data item...a variable shouldn't really come into play. Through code, you'll need to (OnPreDataItem for the Item data item) filter the records:
SETFILTER("Replenishment System",'%1|%2',"Replenishment System"::"Prod. Order","Replenishment System"::Assembly);Rob Hansen
http://www.epimatic.com0
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