Auto mapping of record producer variable to incident variable is not working in Service Portal

arnabwa
Giga Guru

Hi Snow Enthusiasts,

 

The Case: Created a record producer on Incident. Need to map variable values to incident fields. The record producer is in the service portal. Variables present are: Requested for, Location, Business Service, Category, Subcategory, Short Description, Description, Additional comments. All variable names have been given same as the corresponding incident field names where they need to map.

The Issue: The variables Requested for, Location, Business Service, Category, Subcategory are mapping fine in the incident fields. But variables Short Description (wide single line), Description (multi line), Additional comments (multi line) are not mapping whatsoever.

My Tries: I tried with the scripting area in the record producer. Tried by taking the values of the faulty variables in a variable in the script and changed to toString() but no luck. The variables Short Description, Description, Additional comments were in a variable set earlier, I removed the variable set and made direct variables on the record producer and then used 'Map to field' check box but still no luck. The variables Requested for, Location, Business Service, Category, Subcategory are also in a variable set but they work fine.

The Note: The issue is only from the portal side. In the native view, the mapping for the same RP works fine.

The Request: Please let me know if I am missing a simple trick here or what else can we do to achieve the mapping.

Before submission: 

find_real_file.png

After submission: 

find_real_file.png

The Faulty variables: 

find_real_file.png

The script: 

find_real_file.png

Many Thanks,

Arnab

1 ACCEPTED SOLUTION

Hi Alan,

 

Actually I too got the solution when I was thinking about it while I was in the bathroom. 

The fact that the mapping functionality was working in the native view and not on the portal raised my eyebrows. The reason it took me so long to figure it out was that we are using custom widgets which are cloned from the OOB widgets. Hence the widget names are different and I could not figure out quickly that the custom widget I am using is actually cloned from the deprecated widget. 

I then cloned the newer version "SC Catalog Item" of the deprecated widget and brought all the customization we have and then things were working fine.

 

I really appreciate Alan for your participation and continuous follow up until you had solved it. Thanks a lot.

And on lighter note, I understand that lot of things can be solved in a bathroom rather than in front of the laptop. But from now I can take my laptop in the bathroom. How's that for a solution???

View solution in original post

7 REPLIES 7

Alikutty A
Tera Sage

Hi,

Are you able to log the values of these 3 variables in the script area eg producer.short_description? If it logs, can you check in the incident table if there are any business rules or on Load scripts wiping out these values?

Thanks

Hi Alikutty,

 

I really appreciate you for your participation and interest in my problem. Thanks a lot.

I got the solution that I have marked as correct.

alan_lowrance
Mega Guru

Same issue here, we have 3 Record Producers published as sc_items on our ServicePortal and any of the fields that used to map to the finished record aren't ending up on the final record.  Had similar issue with if you make a record producer variable "Mandatory" it doesn't acknowledge it in service portal, you need to not use mandatory on the RP variable and make a catalog ui policy instead for some reason.  So maybe the Map to Field is being ignored as well and just need to hard-code it in the script instead.

As a workaround I'm disabling Map to Field since we only have 3 record producers and instead putting those linkages in the RP script itself like this:

current.short_description = producer.short_description;
current.description = producer.description;