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

Welcome - Microsoft Dynamics 365!

Hi All, In this article we will discuss the new introduced member of Dynamics Family. Yes you heard it correctly, one more new member with Name "Microsoft Dynamics 365" . #ProjectMadeira   #Dynamics365

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 - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.