If you are trying to run this as a scheduled script on FMS it will not work. There is no AppleScript support in FMS.
It seems you are saying that the script runs when the database is local to your desktop or hosted from your desktop but not when hosted on the server.
Have you tried debugging with AppleScript Editor? How far does it get? you may want to try using "of current record to" in place of "of record ID myRecord to"
or for example with quoted for of: set cell "ItemList::Path" of current record to quoted form of filePath
Is there a reason you are navigating layouts in AS instead of FM? Possibly to loop though the PS routine?
You may want to include: tell layout "ItemList" of window "WindowName"
I would guess the object it cannot find is on the ItemListEntry layout since you are on the ItemList layout. I am not an AS expert though.