Hi all, I'm creating a lead record using mapreduce...
# suitescript
s
Hi all, I'm creating a lead record using mapreduce. And in the subsidiary field trying to set a child subsidiary but somehow it is automatically selecting parent subsidiary. I put the log and getting correct value. How to solve this issue.
p
check if you doing dynamic mode, sometimes if you set certain fields it will change the subsidiary. try logging at the end and see or move the setting of subsidiaryid later.
s
I tried it in both dynamic and standard mode let em try change the value before saving the field.
Record*
p
if that's the case workflows/scripts that may setting it (check with other scirpts off if possible. very strange indeed.
s
I checked but didn't find any such script. I will provide more inputs.
n
one possibility is some other script might be setting the subsidiary value or its overriding your subsidiary with other subsidiary. Try finding other scripts that are setting subsidiary values and then reform your logic, that should work out!
s
Checked but I'm able to set it via ui
n
Check for any workflow!! Also attach ur code here to check!! And it’s just setting parent subsidiary or it’s like Hirarchical? Parent Subsi:Child subsi?
s
This is only happening when I'm creating record using script. Here is the code.
It is setting the parent subsidiary. Without any hierarchy.
n
Try from Console the subsidiary setting!! In record edit mode
s
That is working fine. I'm able to set value using ui and console.
n
this is weird, try deleting file and script and again import it newly and test it again!