- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I have created a page variant to create a new record in custom table. In rate type field I want to pre-populate a default value whenever form get loaded.
For this requirement I have added [field] set value handler under From loading state changed.
So, when I preview the configured page, It is showing expected result, like alert is getting printed, field value is getting set to Fixed rate
However when I'm opening URL page, its neither printing alert nor setting field value. Seems events are not getting triggered on URL page. Why this is happening. Please help me to fix this issue.
Thanks in advance for your support.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @lauri457,
Thank you for reverting. Now I got it.
Actually I had configured classic onLoad client script, but it was working on form UI not on workspace. Reason of this issue was that I had select Desktop in UI type. Later I set UI type to All and then it started working on workspace too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Any reason you are not using an onload client script (this can also handle the infomessage) or a default value?
You can also fill values from the url using the query parm when creating new records just like in classic ui: /now/sow/record/incident/-1/params/query/short_description=helloworld%5Edescription=foobar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
If you are using a form component, you can just use a default value on the sys_dictionary record. If it needs to be dynamic you can use an onLoad client script or a dynamic default value.
The variant is overkill for just what you are describing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @lauri457,
Thank you for reverting. Now I got it.
Actually I had configured classic onLoad client script, but it was working on form UI not on workspace. Reason of this issue was that I had select Desktop in UI type. Later I set UI type to All and then it started working on workspace too.
