- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2015 02:04 PM
I have a URL field in a table that I want to be populated by an onBefore BR that parses a link from the description field.
After the parse and setting the field, I have a log statement that shows the field has the URL value I want, but when I open the record the URL field is blank.
When I manually edit the field (paste in the value), the value stays and works normally, so I know there isn't a problem with the field itself. Is there something else I need to do after the "current.u_url = url;" line in the BR to make the value stick?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2015 09:48 AM
I figured out the problem, but first my apologies for doing a poor job describing the scenario.
My business rule was calling a script include, which is why the function was written that way, as you pointed out. The other thing is that the data is coming in via a web service (u_incident), with a transform map transforming the data into the incident table. But the business rule runs on u_incident, not incident.
The key issue was that when I was setting current.u_url, that was in u_incident, even though the field didn't exist there. I don't know why I didn't get an error or undefined result when I logged the variable's value. But once I created the url field in the web service and added it to the transform map, it worked fine with the script the way I originally had it.
Thanks for all of the help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2015 08:15 AM
Add the field in the list layout and see if the value is filled for the field .. This will confirm if the client script/ui policy are involved in this scam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2015 08:24 AM
The field in the list layout is also blank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2015 08:34 AM
Just a few suggestions that may help in your issues if it turns out to not be UI Policies or Client Scripts getting in the way:
I would rewrite your populateURLField function like this:
function populateURLField() {
...
}
I've only seen
populateURLField : function()
written in classes and script includes.
current.description
is an object type and the .match() function is for string.
I wouldn't depend on javascript to coerce it for me in this case, and would write it as:
current.description.toString().match(urlRegex);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2015 09:48 AM
I figured out the problem, but first my apologies for doing a poor job describing the scenario.
My business rule was calling a script include, which is why the function was written that way, as you pointed out. The other thing is that the data is coming in via a web service (u_incident), with a transform map transforming the data into the incident table. But the business rule runs on u_incident, not incident.
The key issue was that when I was setting current.u_url, that was in u_incident, even though the field didn't exist there. I don't know why I didn't get an error or undefined result when I logged the variable's value. But once I created the url field in the web service and added it to the transform map, it worked fine with the script the way I originally had it.
Thanks for all of the help!