Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

How to Clone a record based on a value from a user

$
0
0

Hi guys,

So I have a requirement that I'm not so sure how to fully achieve and I need your help with. 

I have a lookup field named "f1_workordertype".

I also have a number field named "new_assistersamount".

If the lookup field equals "Event" and the user enters a value in the number field than the same amount of records will be cloned (for example if I put 5 in the number field I need five cloned records to be created).

Every one of this cloned records needs the keep the same id of the original with the addition of a dash and a number (for example "same id - 1", "same id -2", "same id -3" and so on based of the value the user set in the number field mentioned above) 

lastly, the value of the lookup fields in those cloned (only the cloned ones and not the original one) records needs to be set to "Assisters Assignment" and the number field needs to be set to 0/read only/null (again, only the cloned ones and not the original one).

I would like to if possible achieve it with js (onSave event) and not a plugin since I have very little experience with.

Thank you all,


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>