Copy Record and its related records Script Issue on Ipad

Discussion created by gdaquino on Aug 16, 2017
Latest reply on Aug 16, 2017 by gdaquino

Hello Experts,

So I have a solution that is set on a structure between buildings, rooms and inner items.


Each building (for survey purpose) has rooms in it. Each room has items inside.

Customer asked to me create a script that make a copy of a room and inner items.


So for instance inside Building 'Hotel Sacramento' I have 16 rooms, if i enter inside room 16 and I want to copy it (for input purpose), my scripts ask for how many copies and then create room 17, 18, 19 (based on the number of copy) and copies even the inner items.


The script works in this way:


1) Save the selected room source id in a variable

2) Create a copy of the room record with a new id and save it in another variable.

3) Go to the items layout and find items with old room id

4) Export it in a temp file

5) Import the file in the items table

6) Change the room id on those items with the new room id.


Those are the 'basic' instruction I put on the script.

Now what happen:


If I run it on my mac it works perfectly with no issue.

If I run it on the ipad it doesn't work. The source room loose the related items.

Last copy of the room doesn't have related item. From the second to n-1 copy everything is ok.


Do you have any suggestion where to check for the issue?

Do you think that the issue is with the import statement? Maybe the char set?


How can I copy the script instructions here?


Thanks a lot,