UpdateTemplateSpecValues(Int32,String,String,String,Nullable<Boolean>,Nullable<Int32>) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The UpdateTemplateSpecValues() method updates all operation spec parameter values based on the spec values of the job currently running on the specified entity.
This overload of the method uses the entity name and site name to specify the entity.
'Declaration
Public Overloads Shared Sub UpdateTemplateSpecValues( _
ByVal sessionId As Integer, _
ByVal userId As String, _
ByVal entName As String, _
ByVal siteName As String, _
ByVal checkPrivs As Nullable(Of Boolean), _
ByVal jobPos As Nullable(Of Integer) _
)
'Usage
Dim sessionId As Integer
Dim userId As String
Dim entName As String
Dim siteName As String
Dim checkPrivs As Nullable(Of Boolean)
Dim jobPos As Nullable(Of Integer)
JobExec.UpdateTemplateSpecValues(sessionId, userId, entName, siteName, checkPrivs, jobPos)
public static void UpdateTemplateSpecValues(
int sessionId,
string userId,
string entName,
string siteName,
Nullable<bool> checkPrivs,
Nullable<int> jobPos
)
Parameters
- sessionId
- Required. Holds the ID of the client session from which the request is being made.
- userId
- Required. Holds the ID of the user who is making the change. This value is used to authorize whether this user is permitted to make such changes.
- entName
- Required. Holds the name of the entity on which the current job is running. The current job is used to identify the correct records to update in the Job_Spec, Oper_Ent_Spec or Bom_Item_Oper_Spec tables.
- siteName
- Optional. Holds the site name of the entity.
- checkPrivs
Optional. Holds a flag that, if set to true, specifies that the user’s privileges should be checked before updating the spec values. Default is false.
- jobPos
- Optional. Holds the job position. If greater than 1, jobs are running on this entity.
This method allows of operation spec values to be set by users with appropriate privileges based on the current spec values of the job currently running on the entity.
The current job information is extracted from the specified job_pos and the spec values are gathered for this job. The values for the specs in the Oper_Ent_Spec and Bom_Item_Oper_Spec tables are updated based on the values from the job. Only specs in the preferred spec version are updated.
For the method to succeed, the following must be true:
- The spec does not already exist in the Oper_Ent_Spec or the Bom_Item_Oper_Spec table.
- A job is currently running on the specified entity.
- If the check_privs flag is true, the user has permission to edit specs.