JobManager offers an API (Application Programming Interface) which can be used to communicate with JobManager from other programs via Web Services.

Introduction

The solution offers functionality to communicate with JobManager for:

Prerequisites

The solution support BC14 and above on both On-Premise and SaaS.

From within the Web Service page in standard BC, create an entry for Codeunit with Object ID 6182999 JobManApiRegistration. Select a Service Name to use from the external application.

Common understanding and description of parameters

Below is a description of common parameters for many of the functions.

Some of them are related to functionality within JobManager. Please seek guidance from a consultant who knows the concepts in JobManager.

Description of functions

Functions that need to return a complex list (typical Subfixed with _Soap) as they return using Soap/XML.

For register realtime (equals to a Punch Clock or Time Clock) use the functions: SignIn, SignOut, BreakStart, BreakStop, JobStart, JobFinish, JobQtyGood, JobQtyScrap.

For register asynchronous in a JobManager Journal use the functions: RegAddSignIn, RegAddSignOut, RegAddBreak, RegInsert, RegModify, REgDelete, RegTotal.

The other functions should be common for the two scenarios.

Functions

GetJob_Soap(_ApiId : Code[10];_JobNo : Code[20];VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get the fields with information for one JobManager Job.

Parameters:

GetJobListAbsence_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible absences. Could be used for picking a JobNo to use as parameter JobNoAbsence to the functions SignIn or SignOut.

Parameters:

GetJobListIpc_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type IPC.

Filters on the list will be filled in automatically according to setup within BC for the given Employee and/or the given User Interface.

Parameters:

GetJobListIpcFilter_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_FilterCategoryNo : Text;_FilterActivityNo : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type IPC.

Filters could be appliesd with the two *_Filter...* parameters.

Parameters:

GetJobListIpcTopX_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type IPC.

This will show the latest X used Jobs according to this.

Parameters:

GetJobListProduction_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Production. Thats jobs related to the Production module of BC.

Filters on the list will be filled in automatically according to setup within BC for the given Employee and/or the given User Interface.

Parameters:

GetJobListProductionFilter_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_FilterWorkCenter : Text;_FilterMachineCenter : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Production. Thats jobs related to the Production module of BC.

Filters could be appliesd with the two *_Filter...* parameters.

Parameters:

GetJobListProductionTopX_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Production. Thats jobs related to the Production module of BC.

This will show the latest X used Jobs according to this.

Parameters:

GetJobListJob_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Job. Thats jobs related to the Job/Project module of BC.

Filters on the list will be filled in automatically according to setup within BC for the given Employee and/or the given User Interface.

Parameters:

GetJobListJobFilter_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_FilterResourceGroupNo : Text;_FilterResourceNo : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Job. Thats jobs related to the Job/Project module of BC.

Filters could be appliesd with the two *_Filter...* parameters.

Parameters:

GetJobListJobTopX_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Job. Thats jobs related to the Job/Project module of BC.

This will show the latest X used Jobs according to this.

Parameters:

GetJobListService_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Service. Thats jobs related to the Service module of BC.

Filters on the list will be filled in automatically according to setup within BC for the given Employee and/or the given User Interface.

Parameters:

GetJobListServiceFilter_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_FilterResourceGroupNo : Text;_FilterResourceNo : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Service. Thats jobs related to the Service module of BC.

Filters could be appliesd with the two *_Filter...* parameters.

Parameters:

GetJobListServiceTopX_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Service. Thats jobs related to the Service module of BC.

This will show the latest X used Jobs according to this.

Parameters:

GetJobListAssembly_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Assembly. Thats jobs related to the Assembly Order module of BC.

Filters on the list will be filled in automatically according to setup within BC for the given Employee and/or the given User Interface.

Parameters:

GetJobListAssemblyFilter_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_FilterWorkCenter : Text;_FilterMachineCenter : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Assembly. Thats jobs related to the Assembly Order module of BC.

Filters could be appliesd with the two *_Filter...* parameters.

Parameters:

GetJobListAssemblyTopX_Soap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_JobManJob : XMLport JobManApi_JobManJob)

Get a list of possible JobManager Jobs of Type Assembly. Thats jobs related to the Assembly Order module of BC.

This will show the latest X used Jobs according to this.

Parameters:

GetListItem(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_SearchText : Text;VAR _JobManApi_Item : XMLport JobManApi_Item)

Get a list of Items from the standard BC Items table. The Items marked as Blocked within BC is excluded.

Parameters:

GetListItemVariant(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ItemNo : Code[20];VAR _JobManApi_ItemVariant : XMLport JobManApi_ItemVariant)

Get a list of Item Variants from the standard BC Item Variant table.

Parameters:

GetListLocation(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ItemNo : Code[20];_VariantCode : Code[10];VAR _JobManApi_Location : XMLport JobManApi_Location)

Get a list of Locations from the standard BC Location table.

Parameters:

GetListBin(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ItemNo : Code[20];_VariantCode : Code[10];_LocationCode : Code[10];VAR _JobManApi_Bin : XMLport JobManApi_Bin)

Get a list of Bins from the standard BC Bins table.

Parameters:

ItemConsumptionGetList(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_StampJournalLineSequence : Integer;VAR _JobManApi_ItemConsumption : XMLport JobManApi_ItemConsumption)

Get a list of Items that is planned or actual used for the associated Stamp Journal Line. For Productions thats the Component List, for Job/Project thats planned item comsumption.

Parameters:

ItemConsumptionAdd(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;StampJournalLineSequence : Integer;_ItemNo : Code[20];_ItemQty : Decimal;_ItemVariantCode : Code[10];_ItemSerialNo : Code[50];_ItemLotNo : Code[50];_ItemLocationCode : Code[10];_ItemBinCode : Code[20];_ItemPackageNo : Code[50])

Add a new item consumption for the associated Stamp Journal Line. It's inserted as and Stamp Event for posting.

Parameters:

ItemConsumptionFieldsEnabled(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ItemNo : Code[20]) RetText : Text

Optional this functions can be used to indicate for the users which fields could be filled in for the ItemConsumptionAdd function above.

The function returns a text with Yes/No for each of the optional parameters for ItemConsumptionAdd.

Sample return value variant=yes;serial=no;lot=no;location=yes;bin=no;package=no

GetFirstActiveJobLineSequence(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;VAR _ReturnStampJournalLineSequence : Integer)

Get the current active Stamp Journal Line for the specified Employee.

If working on more than one job, this function will return the first. If by any change the Employee are allowed to work on several jobs, known as Bundle, it's recommended to use the the GetListActiveJobs function as shown below.

Parameters:

The *_ReturnStampJournalLineSequence* equals to the StampJournalLineSequence which should be used as parameters to other functions.

GetListActiveJobs(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;VAR _JobManApi_JobManStampJournalLn : XMLport JobManApi_JobManStampJournalLn)

Get the current active Stamp Journal Line for the specified Employee.

If always working on only one job at the time, the GetFirstActiveJobLineSequence function could be used for more easy access to the StampJournalLineSequence.

Parameters:

The LineSequence field within the returned list equals to the StampJournalLineSequence which should be used as parameters to other functions.

GetAbsenceRequired(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer) : Integer

Use this function to determine whether Absence should or could be applied upon SignIn and SignOut functions below.

Parameters:

The return value:

SignIn(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer;_JobNoAbsence : Code[20])

Use this function to Clock-In an Employee in realtime.

Parameters:

SignOut(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer;_JobNoAbsence : Code[20])

Use this function to Clock-Out an Employee in realtime.

Parameters:

BreakStart(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer)

Use this function to start a break in realtime.

Parameters:

BreakStop(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text)

Use this function to stop a break in realtime.

Parameters:

JobStart(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer;_JobNo : Code[20];_BundleContinue : Boolean)

Use this function to start a JobManager Job in realtime.

Parameters:

JobStop(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_StampJournalLineSequence : Integer)

Use this function to stop a Stamp Journal Line in realtime.

Stop means stop the time but keep the JobManager Job open for later registration.

Parameters:

JobFinish(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_StampJournalLineSequence : Integer)

Use this function to report finish a Stamp Journal Line in realtime.

Finish means stop the time AND report the JobManager Job as finished.

Parameters:

JobQtyGood(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_StampJournalLineSequence : Integer;_QtyGood : Decimal)

Use this function to report Output Quantity for Production Orders or Assembly Orders related to a Stamp Journal Line in realtime.

Parameters:

JobQtyScrap(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_StampJournalLineSequence : Integer;_QtyScrap : Decimal)

Use this function to report Scrap Quantity for Production Orders related to a Stamp Journal Line in realtime.

Parameters:

RegAddSignIn(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ProfileDate : Date;_TimeOffsetUTC : Integer;_RegDateTime : DateTime) NewJournalLineSequence : Integer

Use this function to insert a Clock-In registration in the JobManager Journal.

Parameters:

The function returns the StampJournalLineSequence for the new line. See common description above.

RegAddSignOut(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ProfileDate : Date;_TimeOffsetUTC : Integer;_RegDateTime : DateTime) NewJournalLineSequence : Integer

Use this function to insert a Clock-Out registration in the JobManager Journal.

Parameters:

The function returns the StampJournalLineSequence for the new line. See common description above.

RegAddBreak(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ProfileDate : Date;_TimeOffsetUTC : Integer;_StartDateTime : DateTime;_StopDateTime : DateTime;_RegHours : Decimal) NewJournalLineSequence : Integer

Use this function to insert a Break registration in the JobManager Journal.

Parameters:

The function returns the StampJournalLineSequence for the new line. See common description above.

RegInsert(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ProfileDate : Date;_TimeOffsetUTC : Integer;_StartDateTime : DateTime;_StopDateTime : DateTime;_JobNo : Code[20];_RegHours : Decimal;_WorkTypeCode : Code[10];_PostingDescription1 : Text;_PostingDescription2 : Text) NewJournalLineSequence : Integer

Use this function to insert working on a JobManager Job in the JobManager Journal.

Parameters:

The function returns the StampJournalLineSequence for the new line. See common description above.

RegModify(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_LineSequence : Integer;_ProfileDate : Date;_TimeOffsetUTC : Integer;_StartDateTime : DateTime;_StopDateTime : DateTime;_JobNo : Code[20];_RegHours : Decimal;_WorkTypeCode : Code[10];_PostingDescription1 : Text;_PostingDescription2 : Text) : Boolean

Use this function to modify an existing registration in the JobManager Journal.

Parameters:

RegDelete(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_LineSequence : Integer) : Boolean

Use this function to remove an existing registration in the JobManager Journal.

Parameters:

RegTotal(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_ProfileDate : Date) ReturnText : Text

The function returns a text holding the totals for the lines in the JobManager Journal. Could be used to show the Employee totals for inserted lines.

Parameters:

IsSignedIn(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text) : Boolean

Use this function determine wheter an Employee is currently Clocked-In (SignIn) or not.

This function could be used to hide/show Clock-In/-Out buttons:

Parameters:

IsPilot(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text) : Boolean

Use this function determine wheter an Employee is currently an Pilot.

Parameters:

IsAssistantTo(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text) : Code[20]

Use this function determine wheter an Employee is currently an Assistant in a Team. The function return the Employee No for the Pilot.

Parameters:

GetTeam(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text) CurrentTeam : Text

If the Employee is currently register as part of a Team, this function will return a list of all Employees in the Team.

The result is returned as a simple semi colon string: AH;MD;TS.

Parameters:

TeamStart(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer;_PilotNo : Code[20])

This function will start a Teams registration within JobManager. This means the given Employees registrations will follow the registrations of the Pilot.

Parameters:

TeamStop(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer)

This will stop the current Team registration for this Employee.

Parameters:

TeamChangePilot(_ApiId : Code[10];_EmployeeId : Text;_UserInterfaceRelation : Text;_TimeOffsetUTC : Integer;_PilotNo : Code[20])

This function will change the Pilot witin a Team to one of the others in the current running Team.

Parameters:

See also

Code customization

Reference

JobManager Employee
Employee IDs
JobManager User Interface
JobManager Job
Stamp Journal Lines



This help includes both Dynamics NAV and Dynamics Business Central (BC). All references to NAV applies to both.