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

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

Microsoft Dynamics NAV 2016 - How to Configure Phone Client.

Hi All, In this article we will discuss how we can connect Microsoft Dynamics NAV 2016 with New Client Launched i.e. Phone Client. This Article Contain Steps for a Android Phone as I have Only Android Phone. I am doing it having all tiers on my windows 8 machine, steps remain same for multiple servers but issues might be different. What we Need (Other what we discuss in this article) -  The Service Tier should be on Public IP . Some of the Data-card does not Provide you Public IP. check it for sure.

Download Microsoft Dynamics Business Central on Premises 2020 Wave 2 Release.

 Hi Readers, As Expected Microsoft have released #msdyn365bc 2020 wave 2 is available.  This article provides details of the new release. The 2020 release wave 2 for Business Central delivers a wealth of new features. Read What's new in 2020 Release Wave 2 here .  Dynamics NAV Customers upgrading to Business Central on Prem will be able to run business central on premises, move to cloud or choose a hybrid approach.