Basically my boss has written a wizard that keeps coming up with the following error:
"The script does not have the necessary access writes".
Here is a sample of his script ... it is quite a long wizard, but I can send you all if you wish.
On Error GOTO ErrorHandler
Dim lReq as Long
Dim lErr as Long
Dim lErrSup as Long
Dim hrErrSup as Long
Dim hqErrSup as Long
Dim lErrPO as Long
Dim lErrDel as long
Dim lRc as Long
Dim hr as Long
Dim lPO as Long
Dim lDel as Long
Dim lPOL as Long
Dim hqPO as Long
Dim hrPO as Long
Dim hqDel as Long
Dim hrDel as Long
Dim hrAst as Long
Dim hqASt as Long
Dim LAstL as Long
Dim hq as Long
Dim lCount as Long
Dim lCV as long
lCount=1
'get Current request
lReq={pgRequest.dblRequest}
hq=amQueryCreate()
lErr=amQueryExec(hq,"Select lReqId From amRequest WHERE lReqId=" & lReq & ""

If lErr<>12004 then
hr=amGetRecordHandle(hq)
lRc=AmCreatePOsFromAllReqLines(lReq,1,0)
lErrPO=AmDBGetLong("SELECT Count(lPOrdId) From amPOrder WHERE lReqId=" & lReq)
hqPO=amQueryCreate()
lErrPO=amQueryExec(hqPO,"Select lPOrdId From amPOrder WHERE lReqId=" & lReq)
Do While lErrPO <>12004
lCV=AmStartTransaction()
hrPO=amGetRecordHandle(hqPO)
lPO=amGetFieldLongValue(hrPO,0)
lRc = AmSetFieldStrValue(hrPO, "PONumber", {PARAMS.sOrder} & "/" & lCount)
lRc = AmUpdateRecord(hrPO)
lCount=lCount+1
lDel=AmCreateDelivfromPO(lPO)
lRc=amReceiveAllPOLines(lPO,lDel)
lCV=AmCommit()
lRc=AmReleaseHandle(hrPO)
lErrPO=amQueryNext(hqPO)
Loop
End If
hqAst=amQueryCreate()
lErr=amQueryExec(hqAst,"Select lAstId From amAsset WHERE ReqLine.lReqId=" & lReq & ""

Do While lErr<12004
lRc=AmStartTransaction()
hrAst=amGetRecordHandle(hqAst)
lErr=amSetFieldStrValue(hrAst,"Field1",UCase({PARAMS.sRequest}))
lErr=amSetFieldLongValue(hrAst,"lLocaID",{PARAMS.lLoc})
lErr=AmSetFieldLongvalue(hrAst,"lLicCntrId",{PARAMS.lContract})
lErr=amUpdateRecord(hrAst)
lRc=AmCommit()
lRc=AmReleasehandle(hrAst)
lErr=amQueryNext(hqAst)
Loop
lErr=amQueryExec(hq,"Select lReqId From amRequest WHERE lReqId=" & lReq & ""

If lErr<>12004 then
lRc=AmStartTransaction()
hr=amGetRecordHandle(hq)
lRc = AmSetFieldDoubleValue(hr, "seApprStatus", "1"

lRc = amSetFieldDoubleValue(hr, "bSatisfied", "1"

lErr = AmUpdateRecord(hr)
lRc=AmCommit()
End IF
lErr=AmSetProperty("PARAMS.sReqLineVal.Value",AmDbGetList("SELECT Brand,Product.Model,lQty,lQtyReceived,FV_geniBuy,FV_ClientBuy,pDiscount,mNetCost FROM amReqLine WHERE lReqId=" & {pgRequest.dblRequest} & "","|",",", "="

)
lErr=amMsgBox("Assets Created"

Exit Function
ErrorHandler:
On Error Goto 0
lErr = AmLog(AmLastError() & " - " & AmLastErrorMsg(), LOG_ERROR)
lErr = AmLog(FormatResString("The transaction $1 has been canceled", ""

, LOG_ERROR)
lErr = AmRollBack()
RetVal = 1
Exit Function