Server side equivilent of g_form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2014 08:04 AM
A simple business rule I was creating didn't work and I found out the g_form.setValue function I was using is only client side. Is there a server side equivalent? What would I need to do to get this business rule to work?? (See attached)
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2014 08:30 AM
Check if 'u_fcr' is a boolean field or string field. If sting field then place the value in quotes example: current.u_fcr = "true".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2014 08:31 AM
Can you explain a little bit what you are trying to accomplish? I want to understand why not use client script in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2014 08:37 AM
Depending on your requirement you can either use Client script or Business Rule.
If you are using Client Script then you have to use g_form.<field name>
If you ae using Business Rule then you must use current.<field name>. In Business rules g_for,m is not in scope in other words g_form is not available.
Client side 'g_form' is equivalent to server side 'current'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2014 08:49 AM
Thanks everyone! Looks like it was two things. I had to change the business rule to run 'before' rather than 'after' insert and I had to change the script to use current.u_fcr = true; rather than g_form.setValue.