Record is being created but data is not storing

LikhithG1022320
Tera Contributor

Hi community,
I have created fields using html, css, client and server scripts using widgets in portal and along with that I have created custom table. So, the problem is when I submit the form in portal, record is being created in custom table, but data is not being stored like the data in fields are empty.

4 REPLIES 4

adityahubli
Tera Guru

Hello @LikhithG1022320 ,

Please check whether you have used toString() for the fields you are inserting in your server-side code.

Im attaching one screenshot refer that :

adityahubli_0-1768914066900.png

 

 

If this helps you then mark it as helpful and accept as solution.

Regards,

Aditya,

Technical consultant

Mark Manders
Mega Patron

Since this is not OOB you will need to provide more information. What exactly did you do and what is the code. I assume it's not a simple record producer copying the field values to the record, since you mention that you created a lot of stuff through coding. You will have to share that code, otherwise we'd be guessing.

Quick solution: record producers are created to create records from portal forms. You can just say 'this value needs to go there'.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

M Iftikhar
Tera Sage

Hi @LikhithG1022320 ,

 

You should start by debugging the data flow when the form is submitted. Add log statements in both the client and server scripts to verify what parameters and values are actually being passed while the record is being created.

 

Most of the time, this issue happens because the data is not being passed correctly from the client controller to the server script, or there is a format or mapping issue with the data, or the server script is not receiving the expected values before insert.

 

If my response helped, please mark it as the accepted solution so others can benefit as well.

 

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

Ankur Bawiskar
Tera Patron

@LikhithG1022320 

is this a catalog form and you are using variable of type widget to render the input fields?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader