I need to create an online form for customers to t...
# suitetalkapi
r
I need to create an online form for customers to take a survey. I've basically given up on native NetSuite online forms due a lack of debugging tools and I'm looking at setting up a RESTlet but I'm confused about the flow. Is there a native script type that can be available without login to create the web page for the survey that posts data to the RESTlet? Or would it need to be hosted outside of NetSuite?
c
Whats the deal w/ the forms? I've done this exact thing a few times in NetSuite. If its just data input, itll be really fast to do an online form within netsuite
you set up the record and then make the form and the fields you want to flow back and forth you use the nl prefix
r
I just get unexpected error and there's no debug logs. I tried looking at sources in the console dev tools but I'm unable to catch the error onclick with breakpoints.
b
you probably want a suitelet
suitelets have mechanisms to generate a form
r
wouldn't that require login? it's not out of the question, these are customers who would be taking the survey
c
You can make them available without login but if there's any list/record data, its wide open. Its only good if its just text you are entering or selecting non-netsuite data in dropdowns to submit back.. otherwise its a security issue for data
r
This would be a monthly saved search. All cases closed in the last month. The list of contacts for those cases would have duplicates removed to create a one to many contact to case relationship. Sends an email to each contact with the list of cases. The email would have a link to the suitelet? and would pass the contact id and list of case numbers to the suitelet as params and that would be included with their generic answers. I don't think login is necessary
c
if you have list/record of type contact and or cases, then the end user can see ALL of the contacts and cases
b
the general idea would be to populate the lists with your own options
r
Can't I send ids to the suitelet and look up case/contact data in the restlet? That's safe, right?
b
i don't really understand that question
when you create a field using a suitelet form, you can add select options to it, or have netsuite reference an existing record or list
r
saved search->email(1contact id, many case ids)->link in email->suitelet(id params)->restlet.
b
if you choose an existing record or list, all the options are available, there is no filtering
if you add your own select options, you choose the text and id values to be whatever you want
r
there wouldn't be any select options, only survey questions
the contact and case ids would just be passed to the suitelet and then the restlet
c
then online form is what you want for this 100%
i pm'd you an example
r
blargh. i'll just start over
b
my point of confusion is why you want a restlet, there should be no need for a restlet
c
i think the restlet was the alternative approach
b
its not a real alternative for a public form. restlets require authentication
c
yeah not sure honestly
r
security was my follow up question. i wanted to understand the flow of using a restlet first
looks like i figured out the native online form after all. 👍