Hello Team
Good day to you :)
I just was wondering if there is any new update that came up for M-files that will affect the data types. Because I had a code that actually was working, and just recently it stopped working and kept throwing this error:
<MetadataEditor>, -, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
ScriptErrorHelper.cpp, 96, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MDispatchExImpl.h, 688, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MDispatchExImpl.h, 850, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MetadataCardAction.cpp, 386, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MetadataCardAction.cpp, 570, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MetadataEditor.cpp, 2960, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MetadataModel.cpp, 4276, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MetadataModel.cpp, 4713, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
ElectronicSignatureUIHelper.cpp, 239, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MetadataModel.cpp, 12218, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
CoVaultMountingDocumentOperations.cpp, 3284, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
DocumentCache.cpp, 11717, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
DocumentCache.cpp, 11826, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
DocumentCache.cpp, 20330, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCMethodCallWithRetry.h, 35, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCMethodCallWithRetry.h, 35, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperations.cpp, 13050, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperations.cpp, 7391, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
MCallInLoop.h, 712, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 4221, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 3779, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 9461, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 10135, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 27973, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 2914, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 3131, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 3552, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 4391, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 275, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 340, Script execution failed. ((Abbvie Drug Prescribed, StateAction: 224-12-17)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 340, Wrong data type for property definition "Lab Request Form". (0x8004009A)
VaultScriptSessionTemplates.cpp, 523, Wrong data type for property definition "Lab Request Form". (0x8004009A)
CoActiveScriptSite.cpp, 895, Wrong data type for property definition "Lab Request Form". (0x8004009A)
CoActiveScriptSite.cpp, 737, Wrong data type for property definition "Lab Request Form". (0x8004009A)
Abbvie Drug Prescribed, StateAction, 134, Wrong data type for property definition "Lab Request Form". (0x8004009A)
MNullPropagatingDispatchImpl.h, 126, Wrong data type for property definition "Lab Request Form". (0x8004009A)
MNullPropagatingDispatchImpl.h, 173, Wrong data type for property definition "Lab Request Form". (0x8004009A)
CoVaultObjectOperations.cpp, 569, Wrong data type for property definition "Lab Request Form". (0x8004009A)
CoVaultObjectOperations.cpp, 2287, Wrong data type for property definition "Lab Request Form". (0x8004009A)
ServerVaultObjectOperationsHelper.cpp, 1091, Wrong data type for property definition "Lab Request Form". (0x8004009A)
ServerVaultObjectOperationsHelper.cpp, 1376, Wrong data type for property definition "Lab Request Form". (0x8004009A)
ServerVaultObjectOperationsHelper.cpp, 1608, Wrong data type for property definition "Lab Request Form". (0x8004009A)
RPCObjectOperationsHelper.cpp, 485, Wrong data type for property definition "Lab Request Form". (0x8004009A)
CoRPCOverCOM.cpp, 6343, Wrong data type for property definition "Lab Request Form". (0x8004009A)
RPCDocumentOperations.cpp, 5607, Wrong data type for property definition "Lab Request Form". (0x8004009A)
MCallInLoop.h, 712, Wrong data type for property definition "Lab Request Form". (0x8004009A)
RPCDocumentOperationsHelper.cpp, 223, Wrong data type for property definition "Lab Request Form". (0x8004009A)
RPCDocumentOperationsHelper.cpp, 289, Wrong data type for property definition "Lab Request Form". (0x8004009A)
RPCDocumentOperationsHelperPrivate.cpp, 8845, Wrong data type for property definition "Lab Request Form". (0x8004009A)
RPCDocumentOperationsHelperPrivate.cpp, 9594, Wrong data type for property definition "Lab Request Form". (0x8004009A)
(M-Files 22.8.11717.3 2022-09-23T12:22:41.292Z)
And The code I was using is this:Option Explicit
Dim iPDLabRequest: iPDLabRequest = 1605 'LabRequest Property Definition ID
Dim iPDName: iPDName = 1032 'Patient Property Definition ID
Dim iPDBirthdate: iPDBirthdate = 1046 'Patient Property Definition ID
Dim iPDGender: iPDGender = 1019 'Patient Property Definition ID
Dim iPDMobile: iPDMobile = 1044 'Patient Property Definition ID
Dim iPDCity: iPDCity = 1029 'Patient Property Definition ID
Dim iPDCountry: iPDCountry = 1027 'Patient Property Definition ID
Dim iPDNationality: iPDNationality = 1021 'Patient Property Definition ID
'Dim iPDDose: iPDDose = 1092 'Dose Property Definition ID
Dim iPDDrug: iPDDrug = 1133 'Drug Property Definition ID
Dim iPDCareConsultant: iPDCareConsultant = 1045 'Drug Property Definition ID
Dim iPDIndication: iPDIndication = 1025 'Drug Property Definition ID
Dim iPDPharmacy: iPDPharmacy = 1069 'Drug Property Definition I
Dim iPDReferralDate: iPDReferralDate = 1257 'Due Date Property Definition ID
Dim iPDFirstEncounterDate: iPDFirstEncounterDate = 1258 'Next Dose After Property Definition ID
Dim iPDEnrollmentDate: iPDEnrollmentDate = 1073 'Next Dose After Property Definition ID
Dim iOTDoseReminder: iOTDoseReminder = 110 'Patient Object Type
Dim iCLDoseReminder: iCLDoseReminder = 4 'Patient Class ID
Dim iPDState: iPDState = 39 'State Property Definition
Dim iPDStateDoseScheduled: iPDStateDoseScheduled = 101 'State Dose Scheduled Property Definition
Dim iPDWorkFlow: iPDWorkflow = 38 'Workflow Property Definition
Dim iPDDoseReminderWorkflow: iPDDoseReminderWorkflow = 101 'Dose Reminder Workflow Property Definition
' Create a new Patient
Dim oPropVals: Set oPropVals = CreateObject("MFilesAPI.PropertyValues")
Dim oOnePropVal: Set oOnePropVal = CreateObject("MFilesAPI.PropertyValue")
' Class = Patient
oOnePropVal.PropertyDef = 100
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, iCLDoseReminder
oPropVals.Add -1, oOnePropVal
' Lab Request Form
oOnePropVal.PropertyDef = iPDLabRequest
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, Objver.ID
oPropVals.Add -1, oOnePropVal
' Patient
oOnePropVal.PropertyDef = iPDName
oOnePropVal.TypedValue.SetValue MFDatatypeText, PropertyValues.SearchForProperty(iPDName).TypedValue.Value
oPropVals.Add -1, oOnePropVal
' Drug
oOnePropVal.PropertyDef = iPDDrug
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDDrug).TypedValue.Value
oPropVals.Add -1, oOnePropVal
' Dose
'oOnePropVal.PropertyDef = iPDDose
'oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDDose).TypedValue.Value
'oPropVals.Add -1, oOnePropVal
' Referral Date
oOnePropVal.PropertyDef = iPDReferralDate
oOnePropVal.TypedValue.SetValue MFDatatypeDate, PropertyValues.SearchForProperty(iPDReferralDate).TypedValue.Value
oPropVals.Add -1, oOnePropVal
' FirstEncounterDate
oOnePropVal.PropertyDef = iPDFirstEncounterDate
oOnePropVal.TypedValue.SetValue MFDatatypeDate, PropertyValues.SearchForProperty(iPDFirstEncounterDate).TypedValue.Value
oPropVals.Add -1, oOnePropVal
' EnrollmentDate
oOnePropVal.PropertyDef = iPDEnrollmentDate
oOnePropVal.TypedValue.SetValue MFDatatypeDate, PropertyValues.SearchForProperty(iPDEnrollmentDate).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'Birthdate
oOnePropVal.PropertyDef = iPDBirthdate
oOnePropVal.TypedValue.SetValue MFDatatypeDate, PropertyValues.SearchForProperty(iPDBirthdate).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'Gender
oOnePropVal.PropertyDef = iPDGender
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDGender).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'Mobile
oOnePropVal.PropertyDef = iPDMobile
oOnePropVal.TypedValue.SetValue MFDatatypeText, PropertyValues.SearchForProperty(iPDMobile).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'City
oOnePropVal.PropertyDef = iPDCity
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDCity).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'Country
oOnePropVal.PropertyDef = iPDCountry
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDCountry).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'Nationality
oOnePropVal.PropertyDef = iPDNationality
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDNationality).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'CareConsultant
oOnePropVal.PropertyDef = iPDCareConsultant
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDCareConsultant).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'Indication
oOnePropVal.PropertyDef = iPDIndication
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDIndication).TypedValue.Value
oPropVals.Add -1, oOnePropVal
'Pharmacy
oOnePropVal.PropertyDef = iPDPharmacy
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, PropertyValues.SearchForProperty(iPDPharmacy).TypedValue.Value
oPropVals.Add -1, oOnePropVal
' Assign workflow - Patient Workflow
oOnePropVal.PropertyDef = iPDWorkFlow
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, iPDDoseReminderWorkflow
oPropVals.Add -1, oOnePropVal
' Assign workflow state - New Patient
oOnePropVal.PropertyDef = iPDState
oOnePropVal.TypedValue.SetValue MFDatatypeLookup, iPDStateDoseScheduled
oPropVals.Add -1, oOnePropVal
' Not single file document
oOnePropVal.PropertyDef = 22
oOnePropVal.TypedValue.SetValue MFDataType.MFDatatypeBoolean, false
oPropVals.Add -1, oOnePropVal
Dim oObjectVersionAndProperties: set oObjectVersionAndProperties = Vault.ObjectOperations.CreateNewObject(iOTDoseReminder, oPropVals, nothing, nothing)
Call Vault.ObjectOperations.CheckIn(oObjectVersionAndProperties.ObjVer)
Any Ideas?