|
Error Calling Method
Posted: 11 Jul 07 2:38 PM
|
I'm having trouble with some functions I created, here's the background: They are lookups under the Lookup|Defects menu in SLX v7.01. They work correctly, but when I finish using one and hit the "OK" button I get the following error:
"An error occurred executing GlobalScript (System:Global Defects) Error calling method OnBeforeFunctionExecute_LookupDefectArea (for example) at line 85 character 5" When that goes away, I get the unknown function: -1 error.
I gave the appropriate users rights to the functions in Administrator, as well. Anybody see any problems with this script? Thanks for any help!
----------------- Function OnBeforeFunctionExecute_ViewDefects(FunctionNumber, FunctionName) Dim objMainView
Set objMainView = Application.MainViews.Add("System:Defect Details", 1, True) 'DNL Set objMainView = Nothing OnBeforeFunctionExecute_ViewDefects = True End Function
Function OnBeforeFunctionExecute_InsertDefect(functionNumber, functionName) Dim objMainView, objDetail Dim strDefectID
If Not Application.BasicFunctions.HasPermission("DEFECT", 1) Then 'DNL MsgBox Application.Translator.Localize("You do not have security to insert Defects."), vbInformation, "SalesLogix" OnBeforeFunctionExecute_InsertDefect = False Else Set objMainView = Application.MainViews.Add("System:Defect Detail", 0, False) 'DNL Set objDetail = objMainView.DetailsView objMainView.Caption = Application.Translator.Localize("Insert New Defect") strDefectID = Application.BasicFunctions.GetIDFor("DEFECT") 'DNL objMainView.SetDataMode 1, strDefectID objDetail.Script.WhenInsertNewDefect(strDefectID) If objMainView.ShowModal = mrOK Then Application.MainViews.AddEx "System:Defect Details", 1, True, 1, strDefectID, "" 'DNL End If OnBeforeFunctionExecute_InsertDefect = True Set objDetail = Nothing Set objMainView = Nothing End If End Function
Function OnBeforeFunctionExecute_LookupDefectDefectID(functionNumber, functionName) Application.BasicFunctions.LookupItemWithConditionByID "DEFECT:DefectID", False, "", "", "", "" 'DNL OnBeforeFunctionExecute_LookupDefectDefectID = True End Function
Function OnBeforeFunctionExecute_LookupDefectArea(functionNumber, functionName) (FYI: This is line 85) Application.BasicFunctions.ShowMainViewFromLookupWithConditionByID "DEFECT:Area", False, "", "", "", "" 'DNL OnBeforeFunctionExecute_LookupDefectArea = True End Function
Function OnBeforeFunctionExecute_LookupDefectFixedinbuild(functionNumber, functionName) Application.BasicFunctions.ShowMainViewFromLookupWithConditionByID "DEFECT:Picklist.Text", False, "", "", "", "" 'DNL OnBeforeFunctionExecute_LookupDefectFixedinbuild = True End Function
Function OnBeforeFunctionExecute_LookupDefectResolutioncode(functionNumber, functionName) Application.BasicFunctions.ShowMainViewFromLookupWithConditionByID "DEFECT:Resolutioncode", False, "", "", "", "" 'DNL OnBeforeFunctionExecute_LookupDefectResolutioncode = True End Function |
|
|