Updating last cost via BPM

I'm using the code below to update the last cost of a part when a
purchased, non-stock part is received. This is on the post
receipt.update method and is working.



I'm trying to get this working from the mass receipt screen as well but
have so far been unsuccessful. Using the log I have tracked the method
to CommitRcvDtl but after this I'm lost.



As you can tell I'm fairly new to this.





---------------------------------------------------------------------

find first ttRcvDtl where (ttrcvdtl.rowmod = 'A' or ttrcvdtl.rowmod =
'U') and ttrcvdtl.Received = true no-error.

if available ttrcvdtl then do:



find first part where part.company = ttrcvdtl.company and part.partnum =
ttrcvdtl.partnum and part.nonstock = true and part.TypeCode = 'P'
no-lock no-error.

if available part then do:



find first partcost where partcost.Company = part.Company and
partcost.partnum = part.PartNum no-error.

if available partcost then do:



partcost.LastMaterialCost = ttrcvdtl.OurUnitCost.



end.

end.

end.

---------------------------------------------------------------------




Chris HenzelEpicor 9 Project ManagerTel: +44 (0)1582 436150Mob: 07836 314164


This message contains confidential information and is intended only for the intended recipients. If you are not an intended recipient you should not disseminate, distribute or copy this email. Please notify the sender if you have received this email by mistake and delete it from your system.Email transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender does not accept liability for any errors or omissions in the contents of this message, which arise as a result of email transmission. Registered Office: Hayward Tyler Ltd, 1 Kimpton Road, Luton, LU1 3LD, England. Tel: +44 (0)1582 731144. Company No. 3450138.



[Non-text portions of this message have been removed]