---
title: "Comment by Eric Sacramento on \"Saving Rich Text Content to the DB Via an Ajax Process in APEX\" | Hashnode"
description: "Hello Jon, I attempted to reproduce your code, but I believe I may have overlooked something. When I open the page for a new record and wait for 30 seconds, I e"
url: "https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/65ea18ee21576febad6790d2"
---

[Discussion](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052)

Comment [Saving Rich Text Content to the DB Via an Ajax Process in APEX](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052)

[Eric Sacramento](https://hashnode.com/@ericsacramento)

[Mar 7, 2024](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/65ea18ee21576febad6790d2)

Hello Jon, I attempted to reproduce your code, but I believe I may have overlooked something. When I open the page for a new record and wait for 30 seconds, I encounter a 'no data found' error. However, aside from that issue, everything else is working as expected. Could you please confirm? Thanks, Eric

[Jon Dixon](https://hashnode.com/@orclapex)

[Mar 7, 2024](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/65ea18ee21576febad6790d2#reply-65ea35da10cc7a38dc210c8a)

Hi Eric. The only place I can think a NO\_DATA\_FOUND error would occur is if the p\_note\_id variable was not set and the SELECT statement on line 13 of the PL/SQL code raised a NO\_DATA\_FOUND exception. I would add some debug statements to verify p\_note\_id is populated.

[Eric Sacramento](https://hashnode.com/@ericsacramento)

[Mar 8, 2024](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/65ea18ee21576febad6790d2#reply-65eb0bbff23b1f9bbb2f1f00)

Exactly! The issue lies on line 13. It arises because the JavaScript runs every 30 seconds, even for new records. The problem specifically occurs for new records where P50\_NOTE\_ID is null. Since this item is null, I encounter a NO\_DATA\_FOUND exception. Thanks.

[Victorya Ebrahimi](https://hashnode.com/@Victorya)

[Mar 12, 2024](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/65ea18ee21576febad6790d2#reply-65f055bec69fd8704320a566)

[Jon Dixon](https://hashnode.com/@orclapex) Hey John . I have the same issue as [Eric Sacramento](https://hashnode.com/@ericsacramento) mentioned. Would you please share the debug statements that you've added to verify the value of p\_note\_id ? I really don't know what to do and should I add some exceptions?

[Jon Dixon](https://hashnode.com/@orclapex)

[Mar 12, 2024](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/65ea18ee21576febad6790d2#reply-65f0ce2c7a28e551eb98dc6f)

[Victorya Ebrahimi](https://hashnode.com/@Victorya), as Eric mentioned, I think you are getting this error because my code assumes a record was already created in cnnt\_notes before the background save kicks in. You could either create an initial record before the background save starts, or ignore the PL/SQL code in save\_note\_bg if p\_note\_id is NULL.
