Skip to main content

How to Use - Job Queue Parameter String?

Hi All,

Today we will discuss about the Parameter String Field in Navision Job Queue Entry Page / Form. 

The Functionality is still same, so the steps below can be replicated and used in NAV Classic also. For Demo Purpose We will be using NAV 2013 R2.

Why we need to have a Parameter?

Consider a Scenario where you want to does multiple things with a single objects in NAS based on parameter you pass. Example - There should be different action on the sales Header Table based on Parameter that I Pass.

So Let's see how to use the Parameter String in Job Queue.

For the Demo, I have created the Job Queue & Job Queue Category List as DEMO.

Now for Demo, I am creating two Tables Demo Customers and Demo Items. The Job Queue will insert Record in these tables based on the parameter that I pass.



The Important Thing to Remember about Parameter String to be used with Job Queue is -
"The Object Should be Running with the Record of Job Queue Entry Table."


We Will be using a Codeunit for the Demo, Go to Properties of OnRun Trigger and Enter the TableNo as 472.

Let's now write condition for the parameter that will be passed by Job Queue. We will be using two functions for creating dummy customer and dummy items based on parameter passed. These functions will be called based on Parameter String Passed.


As Shown below we are done with conditionally executing code based on parameter passed by user.

Let's set-up the Job Queue Entries for Both the Cases as shown below -


IF you see above except the Parameter String, everything else remain Same. So when the first (left) Job is executed an Customer is created and When Second (Right) Job is executed an Item is created.

Let's try to Execute the Job With Item First and see the Results -


Now Let's try to run the Job having Cust as Parameter -


Think of the situation where you can use it. Like Running Batches with Filters.

Hope you find the post useful.

Your Questions and Comments are awaited.

Regards,
Saurav Dhyani

Comments

  1. Hi Saurav,
    Please I need your assistance on workflow user group, with 12 users where only 6 user is needed. I meant how to setup it workflow, thanks
    my gmail account: wasiu.laplace@gmail.com

    ReplyDelete

Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searchi...

Dynamics NAV - All that you need to know about MenuSuites.

Hi Readers, This article is based on a request from a blog reader who wanted to understand about MenuSuite in Dynamics NAV. If you have started working with Business central with AL Code then it does not apply to those releases but if you are interested go ahead. Let's start with Future - In Latest and greatest version of product MenuSuite are obsolete and no longer used. So this article applies if you want to learn about C/AL MenuSuite.