Hello,
What makes you think that the script is not working? Do you face any error messages? If you do, could you post here or send us screenshots?
How exactly do you execute the script? Is it executed as part of a Business Rule? If yes, could you post here or send us a screenshot of the rule configuration? We need something like the following:
