Simple: Autofill cell from previous Cell in row


I am currently trying to to have cell A1 (Barcode Cell) autofill a linked cell B1 (Pallet #) based on a script. I would think its a simple “copy/paste text” situation, but that is not the case. Would anyone be able to figure this one out?