not able to map fields in catalog item

umaaggarwal
Giga Guru
Giga Guru

i created a category in catalog > created a catalog item 

i have a drop down in catalog item wherein user can select any person he is raising that request for, however the problem is that there is no map to option in catalog item, so not able to map that reference field ( referencing to sys_user) to requested for. 

Can someone please help here ?

 

 

7 REPLIES 7

umaaggarwal
Giga Guru
Giga Guru

HI All,

 

Thanks a lot for replying to my question. 

 

1. Yes, I understand map to field is available only on record producer not on item catalog

2. I have created run script to set the requested for to what i select

3. Now, runs script is working fine and flow is going to approval workflow activity , however it is being skipped šŸ˜ž 

Can someone  please help with this ?

 

Thanks!

 

Can you share the screenshot of the approval activity in workflow.

What field have you set in the approval activity?

Not sure if you figured this out, but it sounds like you are having the same problem I am.  Your workflow probably goes something like Start->Run script to set requested for field -> Approval and you are keying off of the requested for field in that approval for the appropriate approval correct?  If that is the case, there is a very slight delay between when your script runs and when the REQ is actually updated, so your approval triggers off the original value and not the current value.  If you add a 1 second timer in between your script and the approval activity you should see it work as expected.  The timing is probably off by something on the order of milliseconds, but it's long enough that your workflow runs faster than the record is updated.

You can get around this in a few different ways:

  1. Add a timer delay as I suggested above
  2. Configure a "before insert" business rule to set the value for every RITM submitted (this of course assumes every catalog item will have that variable, or that your business rule is smart enough to know when the variable is missing).
  3. use a custom approval script on your approval task similar to this one:
    answer = [];
    //get user's manager's sys ID
    var manager = current.variables.<insert your variable name here>.manager.sys_id;
    //add manager into approval
    answer.push(manager);​