thread631-1420246
Hello!
I am just new to Accpac and I'm trying to insert new customer optional field. I have checked threads related to this but I can't seem to make this work. Here is the code snippet. The code runs without errors but no records are inserted to ARCUSO in the database. Any help would be appreciated. Thanks in advance!
Hello!
I am just new to Accpac and I'm trying to insert new customer optional field. I have checked threads related to this but I can't seem to make this work. Here is the code snippet. The code runs without errors but no records are inserted to ARCUSO in the database. Any help would be appreciated. Thanks in advance!
Code:
Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
' Declare Accpac views
'Dim viewARCUS As AccpacCOMAPI.AccpacView
Dim viewARCUSO As AccpacCOMAPI.AccpacView
' Open Accpac views
mDBLinkCmpRW.OpenView "AR0400", viewARCUSO
' Compose Accpac views
viewARCUSO.Compose Array("AR0024")
viewARCUSO.Fields("IDCUST").PutWithoutVerification (strCustId)
viewARCUSO.Read
viewARCUSO.RecordGenerate 0
viewARCUSO.Fields("IDCUST").Value = strCustId
viewARCUSO.Fields("OPTFIELD").Value = "PRICLISTCODE"
viewARCUSO.Fields("VALIFTEXT").Value = UCase(Mid(frmProcessing.CMBGroups.Text, 1, 6))
viewARCUSO.Insert
viewARCUSO.Fields("OPTFIELD").PutWithoutVerification ("PRICLISTCODE")
dsCustomer.Update ' dsCustomer - uses ARCUS view with autocompose = True