- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2017 11:26 AM
I have created a record producer on the incident table. There is field called 'Ask on behalf of this user' on the record producer.
if the field is left blank when submitting the form , the 'caller' field on the incident should be filled with the person who is filling the form ( i think it would be gs.getUserID();)--> NOT WORKING
BUT , if the filed is not blank and is filled with someone , on the incident form , the caller field should be filled with that person's name. --> this part works
This is my code:
if(producer.bahalf_of_this_user=='')
{
current.caller = gs.getUserID();
}
else
current.caller_id=producer.behalf_of_this_user;
MY question--> if the filed on record producer is left blank , the caller on the incident is blank as well , but it should show the person's name who actually filled the form.
Any ideas please?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2017 11:37 AM
Was that a copy / paste? Because it seems there's some typos. Here's how I'd write it.
if(producer.behalf_of_this_user){
current.caller_id = gs.getUserID();
} else {
current.caller_id=producer.behalf_of_this_user;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2017 11:37 AM
Was that a copy / paste? Because it seems there's some typos. Here's how I'd write it.
if(producer.behalf_of_this_user){
current.caller_id = gs.getUserID();
} else {
current.caller_id=producer.behalf_of_this_user;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2017 11:40 AM
Nice catch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2017 11:45 AM
Yes!! that was the problem! must be so tired! nice catch!!! Thank you!