Create operation

You call this function when you want to create a new operation on a job or update an existing.

The minimum to create a new job would usually be these fields
  • sAPIKey
  • sJobCode
  • nLineNumber
  • sOperationCode 
  • sDescription  

You only need to specify the parameters you need to change on an update. So if you want to tell SmartTID that a specific operation is completed you can just pass these fields.
  • sAPIKey
  • sJobCode
  • nLineNumber
  • bOperationCompleted 
Then the integraton procedure in SmartTID will take care of the rest.

It's ok to pass all fields every time if thats the easiest way to handle in your system. We only update in SmartTID when the value for a field has changed


Field
SQL Type
Comment
sAPIKey
VARCHAR(64)
Unique key for each SmartTID customer
sJobCode
NVARCHAR(20)
The number of the job. Can be letters and/or numbers like A360.
nLineNumber
DECIMAL
The order of this operation. The operation will be shown in this order. Like 10 for painting, 20 for packing etc.
sOperationCode
NVARCHAR(20)
Code to identify this operation. Like PAINT for painting, PACK for packing. Can be numbers and/or letters. If the operation is not already in SmartTID it will be created based on this sOperationCode and sDescription
sDescription
NVARCHAR(50)
The description of the operation. Can be unique for this job. So operation could be PAINT and description could be "Painting - color: 9010"
sPlannedTime
NVARCHAR(10)
Planned time for this operation in hours
sERPReference
NVARCHAR(20)
Any reference you may need back to the ERP system. Could be a record ID. This can be used when you need to get data back using GetJobLedgerEntry function
nPlannedQuantityPerHour
DECIMAL
Info field 
nQuantityPerUnit
DECIMALInfo field
nLength
DECIMAL
Info field
nWidth
DECIMAL
Info field
nHeight
DECIMAL 
Info field
bOperationCompleted
BIT
If this operation is completed or not. Only non completed operation are visible to the employee
bReportScrap
BIT 
Indicates that user can be promptet for scrap on this operation if it's been setup in SmartTID
bReportProduced
BIT 
Indicates that user can be promptet for quantity produced on this operation if it's been setup in SmartTID
sColorCode
NVARCHAR(10)
A color that must already exist in SmartTID. If not used the operation will be default blue
nArea
DECIMAL 
Info field
sType
NVARCHAR(50)
Info field
sQuality
NVARCHAR(50)
Info field
sActualDeliveryDate
NVARCHAR(10)
String on format dd-mm-yyyy
sDepartmentCode
DATETIME

sProductCode
DATETIME

sReference
NVARCHAR(50)

sRemark
NVARCHAR(MAX)

sMaterialsRecieved
NVARCHAR(20)
0 for no and 1 for yes
sReadyToShip
NVARCHAR(1)
0 for no and 1 for yes
sExpectedMaterialDeliveryDate
NVARCHAR(10)
String on format dd-mm-yyyy
sInvoiced
NVARCHAR(1)

sManagerCode
NVARCHAR(20)

sOldJobCode
NVARCHAR(20)
If you need to rename a job you can pass this code to tell SmartTID which job to rename to sJobCode in stead off creating a new
sDistrictCode
NVARCHAR(30)



Rev 01, Poul Christensen, 05-04-2019

From database version 6.01.01