This topic contains 2 replies, has 0 voices, and was last updated by chanarbon 8 years ago.
-
AuthorPosts
-
October 30, 2016 at 5:11 am #6008
k_duncHi all,
I’ve created a Custom Record and also created an Online Custom Record Form (with custom HTML). The form URL is emailed as part of an Email Campaign whereby I create a customised URL per Customer, by taking the publishable form URL and appending various parameters. Doing this, prepopulates part of the form already for our Customers, as well as forces the data returned to be more accurate.
As this is an Online Custom Record Form, I am not able to use various APIs as I would ordinarily be able to use in a Client Script. However, I need to attempt to run some sort of NetSuite search to check a field’s value in the specific Customer’s record.
Has anyone been able to achieve this? I’ve tried a form-based Client Script (attached to the Online Custom Record Form Custom Code), but I know for a fact that with an Online Form these search APIs aren’t available. I’m trying a record-level Client Script, but it doesn’t even seem to trigger my code upon loading the Online Form (Page Init).
Any ideas?
Thanks greatly,
Kirk.
This is a cached copy. Click here to see the original post. -
October 31, 2016 at 3:20 pm #6009
pcutlerYou’re on the right track – as you noted, the client script on your online custom record form will lack the necessary permissions to access most data in your NetSuite account. This is a good thing ๐ That said, you can write a Restlet to run your search and create a custom role with the specific permissions that the search requires. Then the client script can call this Restlet using a token created for that role. Feel free to PM me if you need any help.
-
October 31, 2016 at 6:11 pm #6010
chanarbonI do agree with @pcutler’s notes from above that online record forms would lack permissions required a a client script calling a RESTlet would be the best option.
The best option security-wise would be utilizing Token-based Authentication on the call as there will no passwords being exposed on the client side and all that’s left is for you to properly create you OAuth header. You can use the similar algorithm used in SuiteAnswers ID 42172 (https://netsuite.custhelp.com/app/an…il/a_id/42172/) but make sure to check the client script counterpart
-
AuthorPosts
You must be logged in to reply to this topic.