Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WorkOrder.Detail Method

Status
Not open for further replies.

reciprocity00

IS-IT--Management
Nov 12, 2007
6
CA
I would like to store current reference codes and modify reference codes using Connector scripting. Has anyone done this before?

Here is the Mincom documentation:

WorkOrder.Detail Method
Purpose
This method is used to invoke the Detail window

of the MIMS/UI WorkOrder application.

Inputs
DstrctCode
RefCode
WorkOrder


Outputs
RefCode
RefCodeDesc
WoDesc

WorkOrder




Comments
N/A

See Also
N/A
 
I would suggest that you need to use the RefCodes class.
 
I agree with Calator's suggestion. I would use REFCODES.Modify.

The Work Order Reference code entity is a Mincom standard (Mincom-defined rather than User-defined) reference code. Run some queries over the reference code file to find the reference codes for your work orders to see how the data looks.

The structure appears to be:
ENTITY_TYPE = 'WKO'
ENTITY_VALUE = '1' + district + wo
 
I don't think this would work. I am trying to retrieve the reference codes that are assigned to a particular work order and then reassign (copy) it to another work order.

The refcodes class changes the reference code but I just need to change the reference code assignment to a particular work order.
 
Surely it's just a glorified copy-and-paste?
Do a REFCODES.Fetch using first work order (to "copy" the existing values), then do a REFCODES.Modify using second work order (to "paste" those as new values).

The ref codes value does relate to just a single work order because that work order is used to construct the ref code entity_value (= '1' + district + wo)
 
Is it possible for you to be more specific. Here is my code:
Set GetRefCodesBlock = gobjMIMS.Blocks.New
With GetRefCodesBlock.Requests.New

.AddFieldNameValue MIMSX_FLAG_SERVICE, "RefCodes.Fetch"
.AddFieldNameValue MIMSX_FLAG_REPLYLIST, "RefCode" entityvalue = districtcode & CStr(wocell)

With .Instances.New
.AddFieldNameValue "EntityType", "WKO"
.AddFieldNameValue "RefKeyType", "1"
.AddFieldNameValue "SeqNum", "001"
.AddFieldNameValue "RefNo", "010"
.AddFieldNameValue "EntityValue", "1ILMD00716187" End With

HERE IS THE MIMS ERROR:
CHECK SECURITY FOR RefCodes.Fetch /Field: _Restart /Code: mims.e.2126 /Type: 1

Where can I find the SeqNum, RefNo?

The documentation states that the following fields are mandatory for the Fetch method:
EntityType, EntityValue, RefNo and SeqNum
 
The error you are receiving above (CHECK SECURITY FOR...) is becuase you don't have the RefCodes in UPPERCASE - it should be REFCODES.Fetch

Drew
 
RefNo is that assigned by user when the Fef Code was defined using MSO070. You can sql dump MSF070 to see what all reference codes have been defined. For eg refno '010' may be soemthing called Work Order Criticality. You can also use MSO070 to check.

SeqNum will be '001' for those reference codes where the MSO070 definition indicates Repeat Count = 1. If repeat Count is other than 1, it means that several values can be recorded for this detail, and each new value will be assigned an autoincrement Sequence number, eg 002 for the second value, 003 for the third. For eg if '010' was Work Order Color, then 001 can be 'Blue', 002 can be 'White', and so on, up to 'Repeat Count' (eg if "Repeat Count" was 3 you can expect SeqNum up to '003')

I suggest you need to check on MSO070 definition and if that was the case, you need to code the service to allow retrival of multiple values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top