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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Order Detail Unit Costing ?

Status
Not open for further replies.

DanFuhrmann

Programmer
Sep 22, 2008
7
You guys help out alot the other day. Here's another issue that has been causing me greif

I am trying to update an Orders Detail lines Unit Costing. It is readonly in the ACCPAC O/E screen so I can use the marco function to figure this one out. (Although that has helped alot!)

Im developing for ACCPAC Advantage 5.5A. Im using the COM objects. This worked in our code for previous versions.

Code:
'Open all the views
dbACCPAC.OpenView "OE0500", vwOD
   
'Call Compose method on all the views
vwOD.Compose Array(vwOH, vwODOF, vwKS, vwKD) 'change vwBOM to vwKS

vwOD.Init
vwOD.Browse "ORDUNIQ=" & vwOH.Fields("ORDUNIQ") & " AND DETAILNUM=" & rstInvDet("DetailNum"), True
                
If vwOD.Fetch Then
'Item found in ACCPAC
    vwOD.Fields("QTYSHIPPED").Value = rstInvDet("Quantity")
                    
    vwOD.Fields("COSUNTCST").Value = CCur(rstInvDet("ItemCost"))
    vwOD.Fields("COSUNTCONV").Value = 1
    vwOD.Update
End IF
It has no problem updating the QtyShipped. But it tells me that COSUNTCST is a read-only field.

Any ideas?
 
Do the macro recording trick and enter an easily identifiable value like 99.97. I'm assuming that your item is using the User Specified Costing method?
 
If your item does not use User Specified Costing then you will not be able to change the cost since it is controlled by Accpac, after all it is an accounting system.
 
Thanks! - the problem was the item was not set to User Specific Costing Method. And because of that I could not originally do the macro. I am glad you guys are around to share the knowledge!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top