This topic contains 7 replies, has 0 voices, and was last updated by ERPExperts 7 years, 6 months ago.
-
AuthorPosts
-
May 17, 2017 at 4:44 pm #23426
KGosnellGreetings,
I have an embedded online form working that does not use an iFrame.
My challenge now is to use the same methodology to populate a Custom Record from an embedded online form.
NetSuite throws a "invalid record type" when I try to use the same code (in essence) to create a new custom record.
Any insight is much appreciated.
There must be a way to populate a custom record using an embedded online form without the dreaded iFrame.
Thanks
Simple embedded code that creates a lead record in NetSuite without an iFrame.
================================================== ==============================================
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Lead Form Template</title>
<style type="text/css">
</style>
</head>
<body>
<div class="formSection">
<h2>Online Lead Form</h2>
<form id="leadForm" action="https://forms.na1.netsuite.com/app/site/crm/….." method="post">
<label>First name</label><input name="firstname" type="text"><br>
<label>Last name</label><input name="lastname" type="text"><br>
</div><br>
<input type="submit" value="submit">
</form>
</div>
</body>
</html>
================================================== ================================================== ========
Trying to create a custom record using the same methodology.
Only difference is the action and the label names..
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Custom Record</title>
<style type="text/css">
</style>
</head>
<body>
<div class="formSection">
<h2>Custom Record Form</h2>
<form id="leadForm" action="https://forms.na1.netsuite.com/app/site/crm/externalcustrecordpage.nl?……" method="post">
<label>First name</label><input id="445" name="custrecord12" type="text"><br>
<label>Last name</label><input id="446" name="custrecord13" type="text"><br>
</div><br>
<input type="submit" value="submit">
</form>
</div>
</body>
</html>
This is a cached copy. Click here to see the original post. -
May 18, 2017 at 4:18 am #23427
ERPExpertsHi there.
Feel free to view source on our site http://www.erpexperts.co.uk/contact-us/
That's how we've done what you're trying to do.
Thanks
Pete.
-
May 18, 2017 at 7:59 am #23428
KGosnellHi Pete,
Can you help me with viewing your source code ?
Many thanks,
Kyle
-
May 18, 2017 at 8:08 am #23429
ERPExpertsHere you go. Notice that the Ampersands in the URL are HTML Encoded (Replace & with & )
Code:
<form action="https://forms.eu2.netsuite.com/app/site/crm/externalleadpage.nl?compid=1018014&formid=10&h=AACffht_GOeYLh3dqyaSyhfMGiJyG__xZgI%3D" method="post">
<div class="form-group">
<label for="firstname">First Name *</label>
<input data-val="true" data-val-required="Please enter your First Name" id="firstname" name="firstname" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="firstname" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="lastname">Surname *</label>
<input data-val="true" data-val-required="Please enter your Surname" id="lastname" name="lastname" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="lastname" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="title">Job Title</label>
<input id="title" name="title" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="title" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="companyname">Company *</label>
<input data-val="true" data-val-required="Please enter your Company Name" id="companyname" name="companyname" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="companyname" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="phone">Phone Number *</label>
<input data-val="true" data-val-phone="Provided Phone Number is not valid" data-val-required="Please enter your Phone Number" id="phone" name="phone" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="phone" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="email">Email Address *</label>
<input data-val="true" data-val-email="Provided Email Address is not valid" data-val-required="Please enter your Email Address" id="email" name="email" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="email" data-valmsg-replace="true"></span>
</div>
<div class="form-group">
<label for="comments">Your Enquiry (Max 999 Characters) *</label>
<textarea cols="20" data-val="true" data-val-required="Please enter your Enquiry" id="comments" maxlength="999" name="comments" rows="6">
</textarea>
<span class="field-validation-valid" data-valmsg-for="comments" data-valmsg-replace="true"></span>
</div>
<div class="g-recaptcha" data-sitekey="6LcUAhQUAAAAAPIzWe8rck9FcI7aGauKijefEZlr"></div>
<div class="button-wrap">
<button type="submit" class="button">Submit</button>
</div>
</form> -
May 18, 2017 at 8:41 am #23430
KGosnellHi Pete,
Very much appreciated.
I see this form code is for a Lead Record.
I have this working but looking to do the same with a Custom Record.
Have you been able to use this same methodology to submit and populate a custom record ?
Thanks,
Kyle
-
May 18, 2017 at 8:53 am #23431
ERPExpertsHi Kyle
Yes, simply create an Online Form for the Custom Record, and replicate the fields you want filling in.
Change the Form's Action to the Custom Record's Online Form External URL and make sure all the fields in your HTML page have the same ID's as those in the Custom Record Type.
Thanks
Pete.
-
May 18, 2017 at 10:48 am #23432
KGosnellHi Pete,
Thanks again for your responses. Much appreciated.
I attempted just as you suggested and my code is above.
When I do this with a custom record I get a "invalid record type" error.
Have you done this successfully ? Could I see a sample of the code for a custom record ?
Many thanks,
Kyle
-
May 19, 2017 at 4:49 am #23433
ERPExpertsHi Kyle
If you send me the External URL of your Custom Record Online Form, I'll show you what you need to do.
Thanks
Pete
-
AuthorPosts
You must be logged in to reply to this topic.