Record Producer client script does not apply to target record

phoang
Kilo Expert

Hi,

I am on Jakarta patch 2 and now you can apply the catalog client script to the target record.   But I am not able to get this to work.   I created a catalog client script on the record producer and checked the box, but it's not working on the target record.   It works just fine for the catalog item.

Has anyone been able to get this to work?

Thanks.

Phuong

8 REPLIES 8

Bonnie Cresswe2
Kilo Guru

Hi Phuong


Did you ever resolve this?


I am on Jakarta Patch 3 and have the same issue.  


I noticed in the release notes for Jakarta Patch 2 the following problem/fix, so I suspect that in fixing it one way they have broken it the other??



Service Catalog


PRB1090985


UI policies run on target records even when they are configured to not run on target recordsExisting UI policies are applied on the target record of the record producer even though the 'Applies on the Target Record' option is disabled in UI policy definition
  1. Ensure that the incident form is configured to display incident variable editors.
  2. Create a record producer on the incident table.
  3. Create a variable for the record producer:
    • Name: single
    • Type: single line text
  4. Create a UI policy on the record producer where: if the user enters the value in single line text as "test", the field becomes read-only.
  5. Configure these settings:
    • Select Applies on Catalog Item view
    • Deselect Applies on Target record
  6. Save the changes and try the record producer.
  7. Enter the value as "test" in the record producer.
  8. Click Submit.

Expected behavior: When the user enters "test", the single line text should be marked as read-only. Upon clicking Submit, the page should redirect to the incident form, and under the incident form variable editor, the field should not be marked as read-only.


Actual behavior: Even though the "Applies on Target Record" option is disabled in the UI policy definition, the conditions are applied on the target record.


that is talking about UI Policies, but maybe they have broken client scripts as well...


Bonnie Cresswe2
Kilo Guru

I've just resolved this issue for my scenario - I checked for errors on the form and found multiple errors (for all of the variables that were showing when they shouldn't) citing: cross-scope access denied



These threads were helpful, Scoped Application setDisplay on variable set fails due to cross-scope access denied?   and setVisible works, but setDisplay doesn't


basically I recreated my client script in the global scope and inactivated the one that I had created in my scoped application scope, it's working now.


Hi Bonnie,



Yes I believe I did the same and just created a global script.   Thanks for the links!



Phuong