- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 04:49 AM
Hi,
We have a property of type "password2" in our previous version of application, which is built in global scope. Now, we are creating private scoped app. So, while migrating this property value, I am getting "null" value. what is the workaround for this?
In a scheduled job, i have following 2 lines of code. While URL is returning correctly, "password2" property is not returning correctly and null value is returning.
gs.info("Url:" + gs.getProperty("com.url"));
gs.info("Secret:" + gs.getProperty("com.secret"));
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 05:21 AM
Thank you for the clarification.
As you may have already found out, the gs.setProperty() method is not available in scoped apps. However, you might be able to do this with a Fix Script. I believe those run in the global scope. I'd have to double check. The Fix Script will run when the scoped app is installed (using the publish/install method, not update sets.)
Give it a try and let me know.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 05:21 AM
Thank you for the clarification.
As you may have already found out, the gs.setProperty() method is not available in scoped apps. However, you might be able to do this with a Fix Script. I believe those run in the global scope. I'd have to double check. The Fix Script will run when the scoped app is installed (using the publish/install method, not update sets.)
Give it a try and let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 05:31 AM
Hi Chuck,
gs.getProperty() itself returning NULL value. Even it's not able to retrieve a "password2" field.
As I am not able to access "gs.setProperty()", I made a design change. Instead of using properties, I put these properties into a table and started using that table. At the time of migration, I am able to copy all property values of different types. Only password2 value is giving NULL.
gs.getProperty("com.companyname.category.secret')
Meanwhile, I will check whether I can use "Fix scripts".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 05:50 AM
Hi Chuck,
I am able to implement this via fix script. However, i have already a scheduled job, which is doing remaining almost 99% migration. Is there any way, I can call one from another? Either call fix script from scheduled job or vice-versa?
This will help customers/users to run only 1 job, either scheduled job or fix script.
Thanks
Rami Reddy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 05:58 AM
I don't know of an easy way to call one script from another. Scheduled jobs are meant to run on a timed basis (or on demand when someone hits Execute Now.)
If the script only needs to be run once when the app is installed, then a fix script is more appropriate. Move your scheduled job code to the fix script and it will run automatically when the app is installed/updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2016 06:01 AM
Moving scheduled job code to fix script gave me errors like "accessing private scope" objects. I tried to call "scheduled job" from "fix script. Luckily it worked. I think issue is resolved now.