Record producer variable value is not mapping to the field in another table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 05:19 AM
Hi all,
There is no way to use map the field in variable.
I have created a record producer on hr case table and the field was on the employee table. the case gets created on another table at a particular condition. So now i need to map the field value with the record producer value. The field type is choice and the value and the label of both record producer questions and the field choices are same but it was not setting the value. I have used the line in record producer script is:
employee_table.fieldname=record_producer.variable name
can anyone help me how to resolve the issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-07-2024 04:36 AM - edited ‎05-07-2024 04:41 AM
@Community Alums
can you tell me the data type for both fields or variables./ also if choice field on both ends check the choice value for both variable has to be same or else try this static code
if(producer.variable_name=="company")// company is the choice value of the variable which you will select in record producer
{
current.field_name="TATA";//here you are setting varaible value into current employee record which is been submitted by you.
}
and also apply logs on producer.variable_name and check when you enter/select the value for the variable , whats coming into logs and then try to set in current object which will refer to employee table as mentioned in field "tablename" in sc_cat_item_producer table(record producer)
let me know once you try this
Please accept the solution /mark this response as correct or helpful if it assisted you with your question.
Regards,
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 06:06 AM
@Community Alums - You are trying to update or map the value to an another table where RP is not build on that, in this case use the script field and perform the GlideRecord and update the value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2024 06:47 AM
@Abhit I was trying to set the record producer value to the field by default the field dropdown is none. I have tried gliderecord and setting the field and using update but it was not getting updated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2024 08:30 PM
@Community Alums - field which are not present for direct mapping to the table shouldn't be mapped directly, and use script to set those value to the target records field. if you need complete solution send me the details on the private message. will help you on the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2024 09:06 AM
@Ankur Bawiskar Can you please help me with this