$sp.getForm not returning form

Jonathan18
Giga Contributor

I've cloned the approval widget and am trying to modify it to display the related record in a read only form in the widget with the exception of one field which should be able to be changed. I'm trying to get a reference to the form by getting sp.getForm. Here is my code below. The first two lines have valid values with the table being specified and the task.sys id is a valid record. One thing to note is that this is using a custom table which I have named x_software_ac_software_access and not extending the task table.  record.sys_id is an actual record in my table x_software_ac_software_access.  The last line of the code does not work and errors out but I do not see any errors in the logs.

 

data.table = 'x_software_ac_software_access';
data.sys_id = record.sys_id;
data.f = $sp.getForm(data.table, data.sys_id);

Thanks

1 ACCEPTED SOLUTION

Ct111
Giga Sage

Hi Jonathan,

This could be the cause

Navigate to the document title for the specific table (or create a new one) and ensure that the field "Fields" contains the desired value. For example check that the Incident table field is set to "Short Description":

 

Check the below Link it will be useful in identifying  the rootcause for your custom table (x_software_ac_software_access) you would have to create one entry if it doesnt exist

 

LINK

 

 

Mark my ANSWER as CORRECT and HELPFUL if it helps

View solution in original post

11 REPLIES 11

Sourav16
Kilo Guru

Hi,

What error is it showing?

Could you show the HTML template you have wriiten to render the form.

 

Thanks

Sourav

Ct111
Giga Sage

Hi Jonathan,

This could be the cause

Navigate to the document title for the specific table (or create a new one) and ensure that the field "Fields" contains the desired value. For example check that the Incident table field is set to "Short Description":

 

Check the below Link it will be useful in identifying  the rootcause for your custom table (x_software_ac_software_access) you would have to create one entry if it doesnt exist

 

LINK

 

 

Mark my ANSWER as CORRECT and HELPFUL if it helps

Hey did you check the comments I mentioned above ?

Jonathan18
Giga Contributor

Yes, checking on that now and I think that could be the issue. When I get the sys_id of the table and I navigate to that url from that link, I get: 

 

Info Message

Record not found
 
Where then would I create that one entry that you mentioned?