The CreatorCon Call for Content is officially open! Get started here.

Help with image in knowledge article.

Abhijit Das7
Tera Expert

Hi Everyone,

 

I have one custom table which stores url of QR Code , I am calling that url in knowledge article using onChange Client script.

Basically the image is coming when I change the certain field, that means onChange Client script is working fine. But when I save knowledge article then there is blank image . Basically when I savin form then issue is coming.

 

Thanks in advance.

2 REPLIES 2

Robbie
Kilo Patron
Kilo Patron

Hi @Abhijit Das7,

 

Without sight of the Client Script, it's a little hard to response, but thinking out loud and knowing the platform, can you confirm if the actual image attachment is also being added to the article?

If the image attachment is not added, I'm struggling to understand how this will work.

 

Can you please test by adding the attachment to the article that's currently failing and try and re-open the article.

If that's the case, which I suspect it is, you'll need to make sure you cater for this step in your script and upon saving the article.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie

sst183
Tera Contributor

Hi @Abhijit Das7 ,

I would like to review your `onChange()` client script code for further analysis. In some scenarios, using both `onLoad()` and `onChange()` client scripts together can help address various circumstances effectively.

Here are a few steps you can take to troubleshoot and resolve this issue:

1. Ensure the URL is Persisted in a Field:
- Make sure the QR Code URL is stored in a field in the Knowledge Article form, not just temporarily set by the client script.

2. Use UI Policies or Business Rules:
- Instead of relying solely on the `onChange()` client script, consider using a UI Policy or a Business Rule to set the URL field value. This can help ensure that the URL is properly saved and persisted.

3. Set the URL onLoad:
- Use an `onLoad()` client script to set the image URL when the form loads. This ensures that the URL is set whenever the form is opened, not just when the field changes.

Thanks
Saurabh Tripathi
Please consider marking my reply as Helpful sst183_0-1720427982425.png and/or Accept Solutionsst183_1-1720427982428.png, if applicable. Thanks!