<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8455772073626756381</id><updated>2026-10-17T19:52:36.931-04:00</updated><category term="NetSuite"/><category term="JavaScript"/><category term="Webstore"/><category term="SuiteScript"/><category term="Customization"/><category term="tips"/><category term="Scriptable Cart"/><category term="Pardot"/><category term="Automation"/><category term="JSON"/><category term="Webstore Templates"/><category term="Business Process"/><category term="IE"/><category term="Script Parameter"/><category term="Support Case"/><title type='text'>Knowledge Share Care  (CodeBox LLC) - NetSuite/SuiteScript</title><subtitle type='html'>NetSuite, SuiteScript, SuiteFlow, JavaScript, Pardot, Ektron, ASP.Net C#</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-4771026581044898758</id><published>2011-09-01T22:39:00.004-04:00</published><updated>2011-09-01T22:40:00.748-04:00</updated><title type='text'>New Home of Knowledge Share Care: www.codeboxllc.com/ksc</title><content type='html'>Hey Guys. Knowledge Share Care is MOVING!!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;www.codeboxllc.com/ksc&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&amp;nbsp;will be our new home.&lt;br /&gt;
&lt;br /&gt;
I&#39;ll keep this site open for a bit.&lt;br /&gt;
&lt;br /&gt;
Come Visit me at my new house!!!!!</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/4771026581044898758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/09/new-home-of-knowledge-share-care.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4771026581044898758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4771026581044898758'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/09/new-home-of-knowledge-share-care.html' title='New Home of Knowledge Share Care: www.codeboxllc.com/ksc'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-944118169753035846</id><published>2011-08-31T21:56:00.001-04:00</published><updated>2011-09-04T12:35:00.169-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>NetSuite Fact 1: nlapiSubmitField() doesn&#39;t work on ALL fields</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!! &lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Five days ago, I was inspired by the growing list of cases currently assigned to me. Did I say inspired? I meant to say annoyed. There was one case in particular that was marked urgent and needed to be done by the end of the month. (That was five days ago)&lt;br /&gt;
&lt;br /&gt;
It was a simple task yet so important. Update Department and Class field on Transaction records; specifically Sales Order, Cash Sales and Invoices.&lt;br /&gt;
&lt;br /&gt;
Obvious weapon of choice was Scheduled Job and this was the task that helped me realize the power of &lt;a href=&quot;http://knowledgesharecare.blogspot.com/2011/08/script-parameters-where-have-you-been.html&quot;&gt;&lt;b&gt;Script Parameter&lt;/b&gt;&lt;/a&gt;. My choice for SuiteScript API function to update these two fields was nlapiSubmitField(). Why? It costs less (About 20 Governance to load and submit vs 10 to update fields). &lt;br /&gt;
&lt;br /&gt;
I finished my coding in approximately 45 mins. Felt proud and clever so I gave myself a pad on the back. I began testing my code and something odd&amp;nbsp;occurred. Even after nlapiSubmitField was called, my fields weren&#39;t updated!&lt;br /&gt;
&lt;br /&gt;
I thought it was a defect so I tried using the function against other fields such as custom fields and native fields. It worked just fine. It JUST didn&#39;t work for &lt;b&gt;Department &lt;/b&gt;and &lt;b&gt;Class &lt;/b&gt;fields on&lt;b&gt; Transaction record types&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
This was my code:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var flds=[&#39;department&#39;,&#39;class&#39;];&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var vals=[19,51]; //internal ID of department and class&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var rectype=&#39;salesorder&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var recid=555; //internal ID of sales order record&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;nlapiSubmitField(rectype, recid, flds,vals);&lt;/span&gt;&lt;/blockquote&gt;
After testing out the function against other native records such as Customer record type, I called NetSuite Support and asked about it. &amp;nbsp;The support rep. told me that there is an existing defect out there for nlapiSubmitField API call in v2011.2. The problem was, I WASN&#39;T!&lt;br /&gt;
&lt;br /&gt;
I get a response from Support Rep the next day saying this:&lt;br /&gt;
&lt;blockquote&gt;
Upon further investigation, it appears that the Department and Class fields in the Sales order record are both &quot;non-direct list editable&quot;, the nlapiSubmitField in this case behaves as designed. The nlapiSubmitField function will only work for fields which can be Direct List Edited. You can see this on the help guide. Here is the path: &lt;i&gt;SuiteFlex (Customization, Scripting, and WebServices) &amp;gt; SuiteScript &amp;gt; Scripting Records, Fields, Forms, and Sublists &amp;gt; Direct List Editing and SuiteScript &amp;gt; Direct List Editing Using nlapiSubmitField&lt;/i&gt;&lt;/blockquote&gt;
My problem with this response from the support rep. is that no where on that Help section does it say that Department and Class fields are categorized as None-Direct list editable.&lt;br /&gt;
&lt;br /&gt;
However, if you go to &lt;i&gt;SuiteFlex (Customization, Scripting, and Web Services) : SuiteScript : Scripting Records, Fields, Forms, and Sublists : Direct List Editing and SuiteScript : Direct List Editing and SuiteScript Overview &lt;/i&gt;it DOES state this:&lt;br /&gt;
&lt;blockquote&gt;
&lt;b&gt;In SuiteScript, you cannot direct list edit select fields. In other words, you cannot call nlapiSubmitField on a select field.&lt;/b&gt;&lt;/blockquote&gt;
If you look at Department and Class field in &lt;i style=&quot;font-weight: bold;&quot;&gt;SuiteScript Recrods Browser &lt;/i&gt;both are indeed labeled as select fields. &amp;nbsp;What&#39;s MORE interesting is that I have used nlapiSubmitField function to set select fields!!!!!!!!!&lt;br /&gt;
&lt;br /&gt;
If you are having this problem, you are not the only one. If you want to set Department and Class fields on a transaction record such as Sales Order, you will need to do it the old fashion way:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var soid=&#39;123&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var deptid=&#39;19&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var clsid=&#39;51&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var so=nlapiLoadRecord(rectype, trid);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;so.setFieldValue(&#39;department&#39;,deptid);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;so.setFieldValue(&#39;class&#39;,clsid);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;nlapiSubmitRecord(so);&lt;/span&gt;&lt;/blockquote&gt;
My thought is NetSuite should update their documentation to provide Non-Direct editable fields list.</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/944118169753035846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/netsuite-fact-1-nlapisubmitfield-doesnt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/944118169753035846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/944118169753035846'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/netsuite-fact-1-nlapisubmitfield-doesnt.html' title='NetSuite Fact 1: nlapiSubmitField() doesn&#39;t work on ALL fields'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-308490186657868328</id><published>2011-08-27T20:08:00.000-04:00</published><updated>2011-09-04T12:35:37.097-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Script Parameter"/><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><title type='text'>Script Parameters: Where have you been all my life??</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Ok. perhaps script parameters been around for a while. I just failed to see the usefulness of it. You can read all about script parameters by going to &lt;i&gt;NetSuite Help &amp;gt; SuiteFlex &amp;gt; SuiteScript &amp;gt; Creating Script Parameters (Custom Fields)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
While back, I had one of NetSuite Custom Script guy review my codes. I asked him, &quot;Please, imagine you are paying me to do your work and you are doing a code review of my work. Just rip it part and be very critical&quot;.&lt;br /&gt;
And he did just that. One of the suggestion he gave me was to utilize Script Parameters to turn my scripts into &quot;Configurable&quot; script.&lt;br /&gt;
&lt;br /&gt;
What does configuration give you? Re-usability. As you see your script library grow, re-usability plays very important role in keeping your NetSuite account clean and organized.&lt;br /&gt;
&lt;br /&gt;
Think of following situations where you can use power of configuration&lt;br /&gt;
&lt;i&gt;1. Script that applies to multiple entity record types that sets same fields depending on the situation:&lt;/i&gt;&lt;br /&gt;
- You could hard code multiple entity &amp;nbsp;record types in to the script but that&#39;s not scalable.&amp;nbsp;If you end up wanting to add new record, you need update the script and deploy.&lt;br /&gt;
&lt;br /&gt;
- An alternative would be to create one script that takes record types as a parameter and DEPLOY it multiple times. It can easily be extended out to other entity record types by creating another deployment of the script with value of parameter as records internal id. &lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;2. Script that takes different saved searches but ultimately does same thing for each records:&lt;/i&gt;&lt;br /&gt;
- You could hard code different types of saved searches but again, how scalable is that?&lt;br /&gt;
&lt;br /&gt;
- An alternative would be to create one script that takes internal id of a saved search and DEPLOY it multiple times.&lt;br /&gt;
&lt;br /&gt;
I think you are starting to see the trend here. Whats really cool about script parameter is that it can be text field, drop down list or a check box. Why is this cool? It&#39;s easy to set the parameters. Typing in internal ID might not be too user friendly but what if you want to set list of items, departments, or custom record as your parameter? Instead of looking up the internal ID of those records, you simply set it. EASY RIGHT!!!!&lt;br /&gt;
&lt;br /&gt;
Keep in mind, if you want to set custom parameter specific for your script, you leave the Preference as blank.&lt;br /&gt;
You have two other options for this preference; Company and User. You can see full details by going to &lt;i&gt;NetSuite Help &amp;gt; SuiteFlex &amp;gt; SuiteScript &amp;gt; Setting Script Parameter Preferences&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf9OZPPwJ9gooAWvicQXRInTvXFuh_Qsu40DDK_elUZwztxkMInWnecmVqVvJT3VBpaC-9pCv9wiGhgLcI6ZKwMzqVqqm7-ThLliJZQt0o5X5O8xklmED4bRzWnKB2bT35K6wrh_FyobQ/s1600/newScriptParameterTab.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;343&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf9OZPPwJ9gooAWvicQXRInTvXFuh_Qsu40DDK_elUZwztxkMInWnecmVqVvJT3VBpaC-9pCv9wiGhgLcI6ZKwMzqVqqm7-ThLliJZQt0o5X5O8xklmED4bRzWnKB2bT35K6wrh_FyobQ/s400/newScriptParameterTab.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You create your parameter(s) during your script creation stage. You set values for those parameters when you deploy your script.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ID of your custom parameter starts with &lt;b&gt;custscript&lt;/b&gt; prefix. Once you know what your ID is going to be, you can gain access to it with following code:&lt;/div&gt;
&lt;blockquote&gt;
nlapiGetContext().getSetting(&#39;SCRIPT&#39;,&#39;YOUR CUSTOM FIELD ID&#39;);&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
On my screen shot above, I named my parameter _testparam. Full sample code will look like this:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote&gt;
&amp;nbsp;nlapiGetContext().getSetting(&#39;SCRIPT&#39;,&#39;custscript_testparam&#39;);&lt;/blockquote&gt;
I can&#39;t wait to go back and rewrite all my scripts. Happy coding everyone!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/308490186657868328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/script-parameters-where-have-you-been.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/308490186657868328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/308490186657868328'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/script-parameters-where-have-you-been.html' title='Script Parameters: Where have you been all my life??'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf9OZPPwJ9gooAWvicQXRInTvXFuh_Qsu40DDK_elUZwztxkMInWnecmVqVvJT3VBpaC-9pCv9wiGhgLcI6ZKwMzqVqqm7-ThLliJZQt0o5X5O8xklmED4bRzWnKB2bT35K6wrh_FyobQ/s72-c/newScriptParameterTab.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-767526812253728417</id><published>2011-08-24T12:35:00.001-04:00</published><updated>2011-09-04T12:35:31.964-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Automation"/><category scheme="http://www.blogger.com/atom/ns#" term="Customization"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><title type='text'>Do you really need Advanced Billing Module?</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Lately I&#39;ve been pondering on this question. I have this task that I need to do where I must figure out billing that fits the business requirements. &amp;nbsp;It&#39;s not a simple requirement and there are many different variables on how the monthly or annual invoice is generated.&lt;br /&gt;
&lt;br /&gt;
I think for most subscription based and/or fixed amount based businesses, billing is pretty&amp;nbsp;straight&amp;nbsp;forward. However, what about those businesses who has fairly complex process?&lt;br /&gt;
&lt;br /&gt;
As I read through NetSuite documentation and posts on Forums, NetSuite provides out of the box feature for&amp;nbsp;reoccurring&amp;nbsp;billing process. They call it &quot;Memorize Transaction&quot; feature. It allows you to replicate&amp;nbsp;reoccurring&amp;nbsp;billing by having NetSuite &quot;Memorize&quot; this instance of transaction and direct it to run it on schedule of your choice. Sounds pretty simple right?&lt;br /&gt;
This will work as long as the items included in the invoice doesn&#39;t change or no adjustment is needed for the duration of the billing AND you don&#39;t mind making adjustments manually from time to time.&lt;br /&gt;
&lt;br /&gt;
We also have NetSuites&#39; paid featured called Advanced Billing Module &amp;nbsp;I have not used it before and my opinion on this module is purely based on documentation provided by NetSuite. It seems to offer great automation and customization features than &quot;Memorize Transaction&quot; OOB feature. I really like the fact that it will customize billing schedule with initial amount, initial payment terms, recurrence frequency, recurrence count, in arrears, and recurrence payment terms. It definately allows businesses to take control of billing schedules.&lt;br /&gt;
&lt;br /&gt;
But, does it solve the issue of varying amount invoicing? Say like cell phone billing which is based on base amount plus additional overage charge or hourly consultants billing where invoice amount is based on hours worked by the consultants? Can Memorize Transaction or ABM fully automate the process of billing for these situations?&lt;br /&gt;
&lt;br /&gt;
My initial thought is no.&lt;br /&gt;
&lt;br /&gt;
Ofcourse, in order to automate this type of invoicing, you need to identify and create variables that will allow custom process to calculate the correct amount.&lt;br /&gt;
&lt;br /&gt;
I am thinking that for consistently varying monthly or annual invoice process, custom solution will fit better.&lt;br /&gt;
Sure this costs money. Most likely more than what you&#39;ll pay for ABM. However, what I like to suggest is that before you purchase ABM I think it&#39;ll be worth while to revisit the billing business requirements. &lt;br /&gt;
&lt;br /&gt;
What are your thoughts?</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/767526812253728417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/do-you-really-need-advanced-billing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/767526812253728417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/767526812253728417'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/do-you-really-need-advanced-billing.html' title='Do you really need Advanced Billing Module?'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-4087600073428209035</id><published>2011-08-14T10:27:00.000-04:00</published><updated>2011-09-04T12:35:47.402-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Automation"/><category scheme="http://www.blogger.com/atom/ns#" term="Business Process"/><category scheme="http://www.blogger.com/atom/ns#" term="Customization"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><title type='text'>Streamlining the Business Process in NetSuite</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Lately, all I hear in the news is &quot;Down grade in credit rating&quot;, &quot;Recession&quot; or &quot;High unemployment rate&quot;. You most likely know them by heart by now. As a business, all these negative economic news would mean tightening the budget belt and trying to figure out where to cut cost. &lt;br /&gt;
&lt;br /&gt;
If your company is using NetSuite or any other SaaS based CRM/ERP tool, this is a good time to revisit all the business processes you have implemented using the system.&lt;br /&gt;
&lt;br /&gt;
I always like to say that tool itself will not save company money or enhance productivity. It&#39;s how you use the tool that will get you there. (Obvious point I am making....)&lt;br /&gt;
&lt;br /&gt;
Types of business process I am referring to:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Lead to Customer process.&lt;/li&gt;
&lt;li&gt;Drip email marketing process.&lt;/li&gt;
&lt;li&gt;Sales order processing.&lt;/li&gt;
&lt;li&gt;Billing process.&lt;/li&gt;
&lt;li&gt;Customer relation process.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
List goes on...&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some things to look for when you are revisiting your business processes.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Process flow diagram:&lt;br /&gt;
Have you created process diagram for each of your business processes used in the System? If you don&#39;t have it, you really need to create one. Directors and Project Managers can tell you everything about what the processes are but it&#39;s worth nothing when the system doesn&#39;t reflect them.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Identify automation points within the process&lt;br /&gt;
Use the tool to do the work for you. There are some steps in the process where human intervention is inevitable but there are overlooked steps that doesn&#39;t require it. Making sales calls to customers most likely will not be a good candidate for automation but starting a drip marketing campaign is.&lt;br /&gt;
Here are something that I can think of to automate using NetSuite:&lt;br /&gt;
- Auto generation of Sales Order,&amp;nbsp;Proposals&amp;nbsp;or Invoices&lt;br /&gt;
- Conversion process&lt;br /&gt;
- Record creation process&lt;br /&gt;
- Ongoing billing process&lt;br /&gt;
- Subscription renewal process&lt;br /&gt;
- Daily accounting process&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Identify unnecessary or potentially new steps&lt;br /&gt;
If you already have process diagrams for each of the business processes, revisiting them will give you a fresh look.&lt;br /&gt;
&lt;br /&gt;
For some departments or projects, business requirements change frequently. This will give you a chance to compare with current requirements and remove or add in steps you no longer need. This will better&amp;nbsp;streamline&amp;nbsp;the process.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Perhaps it&#39;s not your job to do this type of work. If you are NetSuite Admin or developer, does this SOUND like your job description? Probably not. But wouldn&#39;t you want your company to save money and keep providing the things you enjoy???&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/4087600073428209035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/streamlining-business-process-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4087600073428209035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4087600073428209035'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/streamlining-business-process-in.html' title='Streamlining the Business Process in NetSuite'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-860772342437597906</id><published>2011-08-08T11:19:00.000-04:00</published><updated>2011-09-04T12:35:59.139-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Customization"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><category scheme="http://www.blogger.com/atom/ns#" term="Scriptable Cart"/><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>Scriptable Cart - Full Sample By Jason K</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Hey Guys. I&#39;ve been meaning to post this up but lost track of time due to extermination work I&#39;ve been doing.&lt;br /&gt;
Couple months ago, I&#39;ve worked with Jason K from NetSuite to trouble shoot remove/add issues I was having with my particular scriptable cart process. What this code is SUPPOSED to do:&lt;br /&gt;
&lt;blockquote&gt;
&lt;i&gt;&lt;b&gt;When an item is added with certain country, it&amp;nbsp;pro grammatically&amp;nbsp;adds country specific surcharge item to the cart. In increments existing surcharge item in the cart if it already exists, it adds new country item if it doesn&#39;t exists. Removing parent item will also either increments or&amp;nbsp;decrements&amp;nbsp;the surcharge item.&lt;/b&gt;&lt;/i&gt;&lt;/blockquote&gt;
I have not tried out his code personally but he assures me that it worked for him when he was fully testing out the process in his environment.&lt;br /&gt;
&lt;br /&gt;
I&#39;m hoping this will help in your effort to implement &lt;b&gt;&lt;u&gt;Webstore Scriptable Cart/Checkout form&lt;/u&gt;&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;/*&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;Summary: &amp;nbsp;A custom item option is attached to a certificate which allows the shopper to choose a country.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;When the shopper does this, a surcharge will be added to the cart based on the country chosen. &amp;nbsp;The shopper&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;can also add another certificate to the cart with a different country and there will be a separate line item&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;for each surcharge for each country.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;This script also syncs up quantities for each cert-country combination. &amp;nbsp;For example, if the shopper increments,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;decrements, or adds another Canada certificate to the cart, the quantity of the canadian surcharge will follow&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;that quantity. &amp;nbsp;This will NOT affect the quantity of other surcharges that are not the same country.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;Finally, when a certificate is removed from the cart, the associated surcharge is also removed.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;There are two customizations that were done to the sales order to support this script:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;1) a new custom body field &quot;custbody_processing&quot;, a text field, was added to ensure that no infinite looping&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;is seen.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;2) a new custom body field &quot;custbody_deletedcountry&quot;, a text field, is added and used by the validateDelete&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;event. The problem with recalc during a deletion is that we don&#39;t know what was deleted. &amp;nbsp;But, in our&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;custom validateDelete, if a cert was deleted, we save the cert&#39;s country in this custom field. &amp;nbsp;Then, during&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;recalc, we can just look up what surcharge needs to be removed and remove it.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;There are also a couple of utility functions included below, including safeSelectNewLineItem and safeSelectLineItem.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;In some cases, I&#39;ve noticed that selectNewLineItem and selectLineItem throws an error if the script left the current&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;item row in an uncommitted state. &amp;nbsp;Using these functions will ensure that a commit will be done if need be before&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;a new row is selected. &amp;nbsp;The other functions should be self-explanatory.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var certId = &quot;74&quot;;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;// ID of the general certificate, will including an item option custcol_certcountry&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var certCountry = &quot;custcol_certcountry&quot;;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// name of the custom column&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// Map to define what surcharge item ID belongs to which country.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// In this case, I&#39;ve only set up two countries along with two non inventory items.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var surchargeMap = {&quot;US&quot;:&quot;76&quot;, &quot;CA&quot;:&quot;75&quot;};&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// In order to make things easier for us, we will track the type of cert&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// that is deleted via a validateDelete. &amp;nbsp;Will get the country&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function validateDelete(type)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (type == &#39;item&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;var itemId = nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if (itemId == certId)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;// if we get here, we know a certificate is being deleted. &amp;nbsp;Store the country in our&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;// custom body field for use in recalc.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;var country = nlapiGetCurrentLineItemValue(&#39;item&#39;, certCountry);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;log(&#39;Item ID &#39;+itemId+&#39; being deleted for country &#39;+country+&#39; - storing this in custom field&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;nlapiSetFieldValue(&#39;custbody_deletedcountry&#39;, country);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return true;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// Always return either true or false during validation&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function onRecalc(type, action)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (type != &#39;item&#39;) { return; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;try&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;var processing = nlapiGetFieldValue(&#39;custbody_processing&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if (processing != null &amp;amp;&amp;amp; processing == &#39;T&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;// We are in a secondary recalc, so exit&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;return;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;// If we&#39;ve passed the previous check, we are in the first&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;// level of recalc, so set processing flag&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;nlapiSetFieldValue(&#39;custbody_processing&#39;, &#39;T&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if (action==&#39;commit&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;doCommit();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if (action==&#39;remove&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;doRemove();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;catch (err)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;log(&quot;General Error: &quot;+err.message);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;finally&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;// Now, even with an error, we want to reset the processing flag&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;// so use a finally-clause to ensure this happens no matter what&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;nlapiSetFieldValue(&#39;custbody_processing&#39;, &#39;F&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// Called when a commit is done for recalc&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function doCommit()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;var thisItem = nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// Ignore any add-to-carts that are not certifications&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (thisItem != certId) { return; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;var thisQty = nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;quantity&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;log(&quot;Current qty of cert = &quot;+thisQty);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;var thisCountry = nlapiGetCurrentLineItemValue(&#39;item&#39;, certCountry);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;log(&quot;Current country of cert: &quot;+thisCountry);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;var surchargeId = surchargeMap[thisCountry];&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (isEmpty(surchargeId))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;log(&quot;No surcharge ID found for country &quot;+thisCountry+&quot; - skipping processing&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;var surchargeLine = findItem(surchargeId);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (surchargeLine == -1)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;// We need to add a surcharge here&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;log(&quot;surcharge not found - adding surcharge&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;addItem(surchargeId, thisQty);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;surchargeQty = nlapiGetLineItemValue(&#39;item&#39;, &#39;quantity&#39;, surchargeLine);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;log(&quot;Surcharge found - current Surcharge qty &quot;+surchargeQty);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if (surchargeQty != thisQty)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;log(&quot;updating quantity of surcharge&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;safeSelectLineItem(surchargeLine);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;nlapiSetCurrentLineItemValue(&#39;item&#39;, &#39;quantity&#39;, thisQty);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;nlapiCommitLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// Called when a remove is done for recalc. &amp;nbsp;We have tracked the country that was&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// deleted in the custom field, so this should be straightforward. &amp;nbsp;If there&#39;s no&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// value in the custom field, don&#39;t do anything.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function doRemove()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// First, we get the deleted country from custbody_deleteditem&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;var deletedCountry= nlapiGetFieldValue(&#39;custbody_deletedcountry&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// If it&#39;s empty, this means that the item that was deleted was not a cert, so ignore.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (isEmpty(deletedCountry))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// Start a try-block here so after the remove we are sure that custbody_deletedcountry&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// is cleared out even during an error&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;try&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;log(&#39;Country &#39;+deletedCountry+&#39; has been deleted, finding related surcharge&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;var surchargeId = surchargeMap[deletedCountry];&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;var surchargeLine = findItem(surchargeId);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;// only delete if appropriate surcharge is found&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if (surchargeLine &amp;gt; 0)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;log(&#39;Surcharge item for country &#39;+deletedCountry+&#39; found on line &#39;+surchargeLine+&#39; - removing&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;safeSelectLineItem(surchargeLine);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;nlapiRemoveLineItem(&#39;item&#39;, surchargeLine);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;finally&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;nlapiSetFieldValue(&#39;custbody_deletedcountry&#39;, &#39;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// This function adds the given item to the order&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function addItem(itemID, qty)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;safeSelectNewLineItem();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;nlapiSetCurrentLineItemValue(&#39;item&#39;, &#39;item&#39;, itemID);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;nlapiSetCurrentLineItemValue(&#39;item&#39;, &#39;quantity&#39;, qty);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;nlapiCommitLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// Sometimes, a selectNewLineItem results in an error if there&#39;s uncommitted&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// values in the item list. &amp;nbsp;This makes sure this does not happen.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function safeSelectNewLineItem()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (notEmpty(nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;item&#39;)))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;nlapiCommitLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;nlapiSelectNewLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// Sometimes, a selectLineItem results in an error if there&#39;s uncommitted&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// values in the item list. &amp;nbsp;This makes sure this does not happen.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function safeSelectLineItem(itemLine)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if (notEmpty(nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;item&#39;)))&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;nlapiCommitLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;nlapiSelectLineItem(&#39;item&#39;, itemLine);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;// General find function for the item list&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function findItem(itemID)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;var cnt = nlapiGetLineItemCount(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for (var i=1; i &amp;lt;= cnt; i++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if (nlapiGetLineItemValue(&#39;item&#39;,&#39;item&#39;,i) == itemID)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;return i;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return -1;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// -1 means not found&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function isEmpty(tmp)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return tmp == null || tmp == &#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function notEmpty(tmp)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return !isEmpty(tmp);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function log(msg)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;alert(msg);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/860772342437597906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/scriptable-cart-full-sample-by-jason-k.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/860772342437597906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/860772342437597906'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/scriptable-cart-full-sample-by-jason-k.html' title='Scriptable Cart - Full Sample By Jason K'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-6252148718541706411</id><published>2011-08-02T14:23:00.001-04:00</published><updated>2011-09-04T12:36:19.244-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Customization"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><title type='text'>Couple things NetSuite Documentation Doesn&#39;t Tell You</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
NetSuite most likely doesn&#39;t care what I complain to them about. I&#39;m no body. I&#39;m just a guy trying to make in this world.&lt;br /&gt;
&lt;br /&gt;
However, I think these two items they may listen and PUT it on the documentation or make it more clearer.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Point 1: Check out customization URLs&lt;/b&gt;&lt;br /&gt;
There is ONLY ONE usable checkout URL in Sandbox Environment. That is https://checkout.sandbox.netsuite.com. All other selections are used ONLY for production.&lt;br /&gt;
I came across this issue while making our second webstore in Sandbox. When ever we refresh our Sandbox from Prod, this error occured. I initially thought it was just a flook. However, when second brand new Webstore I started on began to throw &quot;Page Not Found&quot; or &quot;Internal Server Error&quot; with other customizable check out URL, that&#39;s when it got me concerned.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Point 2: Domain IS required to be able to use Descriptive URLs&lt;/b&gt;&lt;br /&gt;
I&#39;m sure some of you already knew this. I couldn&#39;t find anything on documentation about this specific statement. However, If you are having issues with Descriptive URL you set up for Items and Presentation Tabs, you need to set up your own domain.&lt;br /&gt;
&lt;br /&gt;
CORRECTION:&lt;br /&gt;
Apparently, Point 2 is wrong on my part. You can find it under this Path of documentation:&lt;br /&gt;
&lt;i&gt;Web Site : Searching &amp;amp; Search Engine Optimization : Search Engine Optimization (SEO) : Setting Up Descriptive URLs&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
It says:&lt;br /&gt;
&lt;blockquote&gt;
To use descriptive URLs in NetSuite, first, set up a domain at Setup &amp;gt; Web Site &amp;gt; Set Up Domains. Next, turn on the Advanced Site Customization feature, and the Descriptive URLs feature at Setup &amp;gt; Company &amp;gt; Enable Features, on the Web Presence subtab.&amp;nbsp;&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/6252148718541706411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/couple-things-netsuite-documentation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/6252148718541706411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/6252148718541706411'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/08/couple-things-netsuite-documentation.html' title='Couple things NetSuite Documentation Doesn&#39;t Tell You'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-1587198406615782719</id><published>2011-07-30T18:19:00.002-04:00</published><updated>2011-09-04T12:36:28.939-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Customization"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore Templates"/><title type='text'>Webstore Main Menu Customization</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Who uses out of the box template for website any more? If you are using &lt;b&gt;NetSuite Advanced Site Customization&lt;/b&gt;, you have the option to custom build the main navigation bar.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve seen some posting on NetSuite Forum where fellow NetSuite users were asking for ability to build out dynamic menu system on their Webstore without heavy scripting. I am one of them.&lt;br /&gt;
Standard &quot;Tabs&quot; just doesn&#39;t do justice for my brilliant site layout. (I&#39;m seriously being sarcastic here...)&lt;br /&gt;
&lt;br /&gt;
So, how do you build this in WITHOUT heavy scripting? Well... unfortunately, you still need to do SOME scripting but method I found seems to work out without too much headache.&lt;br /&gt;
&lt;br /&gt;
For my little project, I wanted to build dynamic horizontal menu layout.&lt;br /&gt;
&lt;br /&gt;
In NetSuite, you can use &amp;lt;NLPAGETABS&amp;gt; to generate he horizontal tab menu layout. If you sue this tag nested between &amp;lt;table&amp;gt; and &amp;lt;/table&amp;gt; tags in Logo and Tabs Template section under Body tab of your Theme.&lt;br /&gt;
As long as you have your tabs marked as &quot;Show on Website&quot;, that one tag will render everything for you.&lt;br /&gt;
&lt;br /&gt;
Here is sample menu tree I wanted to achieve:&lt;br /&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;Home page&lt;/td&gt; &lt;td&gt;Products (Presentation Tab 0)&lt;/td&gt; &lt;td&gt;Shopping Cart&lt;/td&gt; &lt;td&gt;My Account&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;Product Page 1 (Presentation Tab A)&lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;Product Page 2 (Presentation Tab B)&lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;Product Page 3 (Presentation Tab C)&lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;td&gt;&amp;nbsp; &lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
When visitor mouse over to Products, I want three sub pages to show up. As noted above, each page is a presentation tab with different items.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you were to ONLY use out of the box &amp;lt;NLPAGETABS&amp;gt;, those sub pages will get rendered as main navigation and will NOT look good.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here is how I implemented dynamic custom main menu:&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 1: Find the script you like.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I found a very handy, easy to use dynamic menu from &lt;a href=&quot;http://www.dynamicdrive.com/&quot;&gt;Dynamic Drive&lt;/a&gt;. The script I found is very simple and not much modification is needed. &lt;a href=&quot;http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm&quot;&gt;Details of this script can be found here&lt;/a&gt;. Be sure to read their &lt;a href=&quot;http://dynamicdrive.com/notice.htm&quot;&gt;Terms of Use&lt;/a&gt; before using it. =)&lt;/div&gt;
&lt;div&gt;
I made some modifications to the CSS file to match the theme of my website.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 2: Upload script files, CSS files and any images to your NetSuite Document folder.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
What ever file you decide to use, you need to first upload it to your documents folder to be referenced on your Webstore. Script that I found from Dynamic Drive is fairly small and simple which I really like.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 3: Implement. (This is implementation using the &lt;a href=&quot;http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm&quot;&gt;Script from Dynamic Drive&lt;/a&gt;)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Make sure .js and .css files are referenced at the Header. [Your Theme] &amp;gt; General &amp;gt; Additon to &amp;lt;head&amp;gt; section.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Go to&amp;nbsp;[Your Theme] &amp;gt; Body &amp;gt; Logo and Tabs Template section and add in your navigation.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Code Sample:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;&lt;i&gt;Main Navigation Code:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;div class=&quot;chromestyle&quot; id=&quot;chromemenu&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;ul&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot; rel=&quot;dropmenu1&quot;&amp;gt;Products&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;Shopping Cart&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;li&amp;gt;&amp;lt;a href=&quot;#&quot;&amp;gt;My Account&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
** red=&quot;dropmenu1&quot; indicates a reference to sub menu items.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;i&gt;Sub Menu Navigation Code:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;div id=&quot;dropmenu1&quot; class=&quot;dropmenudiv&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;a href=&quot;#&quot;&amp;gt;Product Page 1&amp;lt;/a&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;a href=&quot;#&quot;&amp;gt;Product Page 2&amp;lt;/a&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;a href=&quot;#&quot;&amp;gt;Product Page 3&amp;lt;/a&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;i&gt;Script Tag:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;i&gt;** Add this after you&#39;ve placed all your menu item&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
cssdropdown.startchrome(&quot;chromemenu&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;lt;/script&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can customize it further to your liking. Please read the details on Dynamic Drive regarding this script.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It&#39;s not that bad. I changed the CSS just a bit to match my pages&#39; colors and didn&#39;t touch the original script file.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
If you&#39;d like to see this page in action, please contact me by email. mhson1978@gmail.com&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Oh yah, one note. If you customize the navigation this way, URL to pages will be a bit hard to manage. I&#39;ve been looking into using &lt;b&gt;Descriptive URL&lt;/b&gt; feature but its not working for me at the moment.&lt;/div&gt;
&lt;div&gt;
I&#39;ve done some research on the Forum and some one DID say this:&lt;/div&gt;
&lt;blockquote&gt;
&lt;b&gt;You must have domain set up in order to use it.&lt;/b&gt;&lt;/blockquote&gt;
I&#39;ve actually asked my network admin to put in a CNAME for me. So if it works, I&#39;ll let you guys know.&lt;br /&gt;
&lt;br /&gt;
Let me know if you have any questions. NetSuite, do you guys know when you&#39;ll add this as Part of NetSuite feature?</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/1587198406615782719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/07/webstore-main-menu-customization.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1587198406615782719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1587198406615782719'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/07/webstore-main-menu-customization.html' title='Webstore Main Menu Customization'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-4853841779990985937</id><published>2011-07-27T23:53:00.000-04:00</published><updated>2011-09-04T12:36:44.193-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>Steps to setting up your customized Invoice Template</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This came as shock to me. I had issues finding different templates for setting up my custom invoice.&lt;br /&gt;
I broke my &lt;a href=&quot;http://knowledgesharecare.blogspot.com/2011/06/how-to-become-true-netsuite-guru.html&quot;&gt;#1 rule of how to become NetSuite Guru&lt;/a&gt;. Did you click on the link? Well, #1 rule is to read the documentation and I did NOT on this particular case. =(&lt;br /&gt;
&lt;br /&gt;
After doing some manly hunting work, I&#39;ve figured out the mapping on &lt;b&gt;custom invoice template&lt;/b&gt;. For us, we needed to include remittance slip on every invoice. Guess what, this is actually one of the feature you have to enable. (Again. READ YOUR DOCUMENTATION!!!)&lt;br /&gt;
&lt;br /&gt;
If you are in the market to do such thing, here is how you enable remittance form with invoices:&lt;br /&gt;
&lt;i&gt;Setup &amp;gt; Company &amp;gt; Printing, Fax &amp;amp; Email Preferences&lt;/i&gt;&lt;br /&gt;
- Check the box next to &quot;Print Remittance Form with Invoices &amp;amp; Statements&quot;&lt;br /&gt;
&lt;br /&gt;
Here is how you set up your customized invoice. You kinda have to go backwards on this and here is why. When setting up your actual invoice, you supply templates for PDF layout, HTML layout and Remittance Slip. &amp;nbsp;Unless you plan to use Standard versions, you want to create custom versions of them.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1-HTML Layout Template:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Go to Setup &amp;gt; Customization &amp;gt; Transaction Form HTML Layouts&lt;/i&gt;&lt;br /&gt;
- Select from different types of &quot;Transaction&quot; forms at your disposal to Customize.&lt;br /&gt;
- Provide custom HTML layout for your invoice under Templates Tab.&lt;br /&gt;
- You can customize HTML for specific NetSuite Tags under Elements tab.&lt;br /&gt;
- Save as &quot;My Invoice HTML Layout&quot; (This is a free country. You can name it what ever you want)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2-&lt;/b&gt;&lt;b&gt;PDF Layout Template:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Go to Setup &amp;gt; Customization &amp;gt; Transaction Form PDF Layouts&lt;/i&gt;&lt;br /&gt;
- Select from different types of &quot;Transaction&quot; forms at your disposal to Customize.&lt;br /&gt;
- Move things around, adjust the font size, text box etc.&lt;br /&gt;
** I found PDF layout customization somewhat difficult to work with. Just my $0.02&lt;br /&gt;
- Save as &quot;My Invoice PDF Layout&quot; (Again, name it what ever you want)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Setting up Remittance Form:&lt;/b&gt;&lt;br /&gt;
If you don&#39;t need to do this, you can skip this section but if you need to &quot;customize&quot; Remittance section, you may want to read on.&lt;br /&gt;
&lt;br /&gt;
I don&#39;t know about you but for us, we needed to add text not available through NLATTRIBUTES. It had to be customized to look like our legacy invoice format. HTML version of Remittance form wasn&#39;t a problem because NetSuite provided highly flexible &quot;TEXTAREA&quot; to write our own HTML. However, PDF version... well, that was different story. Extremely customization UNFRIENDLY!!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 3-&lt;/b&gt;&lt;b&gt;HTML Remittance Form Template:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Go to Setup &amp;gt; Customization &amp;gt; Transaction Form HTML Layouts&lt;/i&gt;&lt;br /&gt;
- Select from different types of &quot;Remittance Slip&quot; forms at your disposal to Customize.&lt;br /&gt;
- Provide your custom HTML for remittance area of your invoice.&lt;br /&gt;
- Save as &quot;My Invoice HTML Remittance Layout&quot; (... Last time... Name it what ever you want)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4-&lt;/b&gt;&lt;b&gt;PDF Remittance Form Template:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Go to Setup &amp;gt; Customization &amp;gt; Transaction Form PDF Layouts&lt;/i&gt;&lt;br /&gt;
- Select your poison from &quot;Remittance Slip&quot; forms to Customize.&lt;br /&gt;
- Move things around, set up the way you want it to look in PDF.&lt;br /&gt;
** DO KEEP IN MIND, I found it Extremely difficult to customize this since only limited fields are at your disposal to display.&lt;br /&gt;
- Save as &quot;My Invoice PDF Remittance Layout&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 5-&lt;/b&gt;&lt;b&gt;Remittance Template Wrapper:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Go to Setup &amp;gt; Customization &amp;gt; Transaction Forms&lt;/i&gt;&lt;br /&gt;
- Select from different types of &quot;Remittance Slip&quot; forms to Customize.&lt;br /&gt;
- For PDF Layout, select &quot;My Invoice PDF Remittance Layout&quot; or what ever you named it on &lt;b&gt;Step 4&lt;/b&gt;.&lt;br /&gt;
- For HTML Layout, select &quot;My Invoice HTML Remittance Layout&quot; or what ever you named it on &lt;b&gt;Step 3&lt;/b&gt;.&lt;br /&gt;
** Quick Note: **&lt;br /&gt;
If you write ANYTHING on Disclaimer textbox, you can get to it by using the tag &amp;lt;DISCLAIMER&amp;gt;. However,... as I noted above, PDF is VERY VERY limited when it comes to providing free text. &lt;b&gt;I actually used Disclaimer box to enter in my free text. &lt;/b&gt;I&#39;m sure it&#39;s not recommended but this was the only way I found to enter in Free-Text. &amp;nbsp;IF you are doing what I did, be sure to do following:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Never use &amp;lt;DISCLAIMER&amp;gt; tag on your HTML template. Since HTML template is more flexible when it comes to free text, you can write it out.&lt;/li&gt;
&lt;li&gt;Move things around on your PDF layout so that disclaimer box appears in different way.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;b&gt;IMPORTANT: Disclaimer and Address textarea are NOT HTML enabled. If you type HTML, it&#39;ll get parsed as regular text&lt;/b&gt;&lt;/i&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
- Finally save this as &quot;My Remittance Template Wrapper&quot;&lt;br /&gt;
&lt;br /&gt;
OK! You are now ready to create your own Invoice Template!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 6-Create Custom Invoice Template:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Go to Setup &amp;gt; Customization &amp;gt; Transaction Forms&lt;/i&gt;&lt;br /&gt;
- Select from different types of &quot;Invoice&quot; froms to Customize.&lt;br /&gt;
- For PDF Layout, select &quot;My Invoice PDF Layout&quot; or what ever you named it from &lt;b&gt;Step 2.&lt;/b&gt;&lt;br /&gt;
- For HTML Layout, select &quot;My Invoice HTML Layout&quot; or what ever you named it from &lt;b&gt;Step 1.&lt;/b&gt;&lt;br /&gt;
- For Remittance Slip, select &quot;My Remittance Template Wrapper&quot; or what ever you named it from &lt;b&gt;Step 5.&lt;/b&gt;&lt;br /&gt;
- Save as &quot;My Custom Invoice Template&quot;&lt;br /&gt;
&lt;br /&gt;
Now you see what I mean by going backwards?&lt;br /&gt;
&lt;br /&gt;
Once you&#39;ve set this up, you can choose your custom invoice from Sales Order templates to be used.&lt;br /&gt;
&lt;br /&gt;
Here are some things that I found Important:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;You need to set up EVERYTHING before you can TRUELY customize the look and feel. From the most parent level, you can provide different fields to be shown which can in turn be accessed by child forms.&lt;/li&gt;
&lt;li&gt;From Customer Center, one you choose as default will be used for PDF layout. (If anyone from NetSuite can correct me on this, PLEASE DO!)&lt;/li&gt;
&lt;li&gt;You CAN override Print in PDF by going to &lt;i&gt;Home &amp;gt; Set Preferences &amp;gt; Transactions Tab &lt;/i&gt;and Setting &quot;Print Using HTML&quot; check box. However, THIS seems to be user based rather than Global setting.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Hope this helps...&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/4853841779990985937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/07/steps-to-setting-up-your-customized.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4853841779990985937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4853841779990985937'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/07/steps-to-setting-up-your-customized.html' title='Steps to setting up your customized Invoice Template'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-8119419912278449516</id><published>2011-06-21T21:41:00.000-04:00</published><updated>2011-09-04T12:37:00.522-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Customization"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Support Case"/><title type='text'>NetSuite Support Case - Grab Notification</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Have you ever&amp;nbsp;received an email from NetSuite Support saying something the line of &lt;i&gt;&quot;Hello, My name is [Rep. Name] and I will be working on your case...&quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
We wanted to do something like this for our support. Thought it was pretty nice way to let folks know that they are not being ignored. After some research, we find out that this isn&#39;t an automated solution.&lt;br /&gt;
&lt;br /&gt;
Apparently, NetSuite Support implemented this method by attaching a solution to a case and having it notify customer. When Solution is attached to the case, they manually enter in Case Number and their name before sending it.&lt;br /&gt;
&lt;br /&gt;
I thought this was a bit odd. Apparently, using CRMSDK Tags do not work when added to a solution set. So, I&#39;ve been thinking about a work around for this. I haven&#39;t tried it yet but I&#39;m sure it&#39;ll work.&lt;br /&gt;
&lt;br /&gt;
First, create yourself a solution called &quot;Case Assignment&quot;. Here is an example:&lt;br /&gt;
&lt;blockquote&gt;
Hello, My name is [RepName] and I&#39;ll be working on your case #[CaseNumber]. &lt;/blockquote&gt;
Second, create a script file which will be deployed at Case form level or Case Record level.&lt;br /&gt;
My thought is that my script will fire ONSAVE or right before the form is submitted.&lt;br /&gt;
&lt;br /&gt;
If the value of the INSERTSOLUTION field is &quot;Case Assignment&quot; AND value of OUTGOINGMESSAGE contains the value [RepName] or [CaseNumber] {&lt;br /&gt;
&lt;blockquote&gt;
Replace [RepName] with Currently Logged in User&#39;s first and last name;&lt;/blockquote&gt;
&lt;blockquote&gt;
Replace [CaseNumber] with getFieldValue(&#39;CASENUMBER&#39;);&lt;/blockquote&gt;
}&lt;br /&gt;
&lt;br /&gt;
What do you think? I think this might work. I&#39;ll let you guys know as soon as I put it in. Working version of the code coming soon.....&lt;br /&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/8119419912278449516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/06/netsuite-support-case-grab-notification.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/8119419912278449516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/8119419912278449516'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/06/netsuite-support-case-grab-notification.html' title='NetSuite Support Case - Grab Notification'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-8113356390029932185</id><published>2011-06-09T22:43:00.000-04:00</published><updated>2011-09-04T12:37:13.338-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IE"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><title type='text'>IE Annoyance - &quot;Do you want to Only show secure elements?&quot;</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I got nothing against Internet Explorer but this is really annoying. Have you ever come across websites where you get system popup window asking you permission to display non-secure elements on secure website? going from IE 7 to 8, they changed the message of popup. With IE 7, it used to be something in the line of &quot;Do you want to display both secure and non-secure elements?&quot;. With IE 8, they changed it to &quot;Do ONLY want to display secure elements?&quot; With IE 9, it now displays a notice message that looks like part of website at the bottom center.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dear Microsoft, stop confusing people and start helping people!!!!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
How does this apply to us NetSuite folks? You guys might already have fix for this on your webstores but I just recently found this as an issue.&lt;br /&gt;
&lt;br /&gt;
If you are like me, you are most likely using small part or all elements of jQuery. You may also use &lt;a href=&quot;http://knowledgesharecare.blogspot.com/2011/04/anyone-using-netsuite.html&quot;&gt;external form to process customer registration data&lt;/a&gt;.If this is you, you may have come across this IE annoyance during your cross browser testing.&lt;br /&gt;
&lt;br /&gt;
What does this error mean? Well, simply put, your URL is https:// but content of the page contains none https elements. Most likely it&#39;ll be reference to external image, javascript and css.&lt;br /&gt;
&lt;br /&gt;
Solution? Tell your customer to read the message before clicking.&lt;br /&gt;
&lt;br /&gt;
Better solution? Change reference to these elements to https.&lt;br /&gt;
Every time you upload a script or an image to NetSuite, you will notice that NetSuite provides you with several different URLs for your uploded items.&lt;br /&gt;
&lt;br /&gt;
I just realized why they provide these. It&#39;s to help you avoid IE&#39;s confusing messages. =)&lt;br /&gt;
&lt;br /&gt;
Go to Documents in your NetSuite account and drill down to folder you uploaded your item. Click on Edit to view details of that items you&#39;ll notice these different URLs.&lt;br /&gt;
&lt;br /&gt;
Hope this helps... if not, hope I&#39;ve given you something to laugh about.</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/8113356390029932185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/06/ie-annoyance-do-you-want-to-only-show.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/8113356390029932185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/8113356390029932185'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/06/ie-annoyance-do-you-want-to-only-show.html' title='IE Annoyance - &quot;Do you want to Only show secure elements?&quot;'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-2394696901159860108</id><published>2011-06-07T11:31:00.001-04:00</published><updated>2011-09-04T12:37:25.852-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="tips"/><title type='text'>How to become a NetSuite Guru</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This is just my opinion but I think I&#39;m starting to see a pattern on how to to become true NetSuite Guru. I&#39;m sure I have a right to say this since I have such knowledge and experience on working with NetSuite. (I&#39;m being really sarcastic here. I don&#39;t have long years of experience and I am not a NetSuite Guru. It&#39;s my way of making a joke).&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;&amp;nbsp;Read NetSuite documentation.&lt;/b&gt;&lt;br /&gt;
I admit, I haven&#39;t read topic in NetSuite documentation. I get lost reading accounting and financing topics. I should have paid more attention in College. It really helps to know where to go for help. I see lot of people jumping the gun and asking people but if you &amp;nbsp;read the documentation answers are there. It also allows you the ability to find what you are looking for quickly.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Expand your knowledge of relational database.&lt;/b&gt;&lt;br /&gt;
You may disagree with me on this but I feel that it really helps if you have understanding in this area. Custom records is nothing but database tables. Creating and defining relationships between custom records and native records allows you to build better forms and business processes.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Become an expert on HTML, CSS and JavaScript&lt;/b&gt;&lt;br /&gt;
If you are doing any kind of customization, you need to know these three technologies. Form customizations, business process customizations and webstore customizations all depends on these three technologies and it will make your life easier as a developer.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Know what is available out of the box as well as online public bundles.&lt;/b&gt;&lt;br /&gt;
I think this goes with point #1. There are times when you get lost in joy and high of customizing NetSuite. However, beware of over customization. There are things that are readily available for you out of the box. You don&#39;t have to build something from ground up. There are also free bundles you can download and customize to your need.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Understand the business needs.&lt;/b&gt;&lt;br /&gt;
With NetSuite, I think it&#39;s very important that you understand organizational goal as well as each departments needs. NetSuite is just a tool.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Atleast have an understanding of NetSuite process.&lt;/b&gt;&lt;br /&gt;
You don&#39;t have to be an expert in project management or accounting or finance. As long as you understand how NetSuite processes them, you can build or configure based on&amp;nbsp;expertise&amp;nbsp;provided by your organizations&#39; department experts.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Study, Practice and Participate&lt;/b&gt;&lt;br /&gt;
I&#39;ve been hearing alot of negative feedback on NetSuite lately. and I have one thing to say to all Nay Sayers. No matter what cloud platforms you go with, if you don&#39;t take time to learn the product you are a lost cause. Always study up on features and unknown features of NetSuite, always practice different methodologies and always participate in user forums.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/2394696901159860108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/06/how-to-become-true-netsuite-guru.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/2394696901159860108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/2394696901159860108'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/06/how-to-become-true-netsuite-guru.html' title='How to become a NetSuite Guru'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-1604817211661651439</id><published>2011-05-28T09:55:00.000-04:00</published><updated>2011-09-04T12:37:37.288-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Scriptable Cart"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><title type='text'>Alternate more efficient way to Debug Webstore Scriptable Cart</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Recently, I had a nice email conversation with &lt;b&gt;Jason K&lt;/b&gt;. from NetSuite. He thought my &lt;a href=&quot;http://knowledgesharecare.blogspot.com/2011/05/how-to-debug-netsuite-webstore.html&quot;&gt;workaround for debugging scriptable cart/checkout&lt;/a&gt; was very clever. It means alot coming from him. However, he actually came up with even better way of debugging scriptable cart/checkout. Jason, you are the MAN!&lt;br /&gt;
&lt;br /&gt;
His method resolves the issue of eating away at script metering in my version of workaround. Using nlapiRequestURL() eats 10 governance from allowance and it causes issue during form testing. He also mentioned something very important as well. &lt;i&gt;With v2011.1, NetSuite relaxed the rules on type of Sales Order form that can be used for scriptable cart/checkout&lt;/i&gt;. This means, you are not restricted to using External Sales Order. You can customize Standard Sales Order and use it for the scriptable cart.&lt;br /&gt;
&lt;br /&gt;
Here is how you go about doing this: Thank you &lt;b&gt;Jason K.&lt;/b&gt; for coming up with this workaround!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1: Create custom sales order forms for both Invoice and CashSales from standard invoice sales order and standard cashsale sales order.&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Setup &amp;gt; Customization &amp;gt; Transaction Forms&lt;/i&gt;&lt;br /&gt;
** Make sure you do NOT put anything under custom code tab for both forms!!!&lt;br /&gt;
After you create the two new forms, make a note of their Internal IDs. You will need them in step 2.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2: Create alternate version of your scriptable cart script. Keep currently working version as your backup. You may need it.&lt;/b&gt;&lt;br /&gt;
At the top of every event functions, add following line of code:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;if (nlapiGetFieldValue(&#39;customform&#39;) != &#39;[InternalID of SO Invoice from Step 1]&#39; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;amp;&amp;amp; &amp;nbsp; nlapiGetFieldValue(&#39;customform&#39;) != &#39;InternalID of SO CashSale from Step 1&#39;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; return;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
This ensures that script only fires for the sales order forms you are using on Webstore.&lt;br /&gt;
Make sure every time you want to print debugging message, you use nlapiLogExecution() call to do so.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 3: Create new &quot;Client Script&quot; file and deploy it for all Sales Order.&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Creating new script file: Set &amp;gt; Customization &amp;gt; Script &amp;gt; New &amp;gt; Client Script&lt;/i&gt;&lt;br /&gt;
Don&#39;t for get to fill out all your event functions and attach any library scripts. Deploying this script for Sales order is up to your preference. I usually do &quot;Save &amp;amp; Deploy&quot;.&lt;br /&gt;
When you are deploying your client script for sales order, make sure list of audience includes Customer Center and perhaps most obvious thing, make sure it &lt;b&gt;Applies to Sales Order&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4: Attach newly created Sales Order forms to your webstore&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Setup &amp;gt; Web Site &amp;gt; Set up web site.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
Under the Setup Tab &amp;gt; Preferences section, select new invoice sales order for Scripting Template (Invoice) and new cash sale sales order for Scripting Template (Credit Card).&lt;br /&gt;
&lt;br /&gt;
That&#39;s it! To view execution logs, you can to go Script or Script Deployment record and click Execution Log tab.&lt;br /&gt;
&lt;br /&gt;
Hope this works out for you guys. Thank you again Jason K for this workaround!</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/1604817211661651439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/alternate-more-efficient-way-to-debug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1604817211661651439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1604817211661651439'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/alternate-more-efficient-way-to-debug.html' title='Alternate more efficient way to Debug Webstore Scriptable Cart'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-1742339641293772736</id><published>2011-05-26T21:19:00.001-04:00</published><updated>2011-09-04T12:37:49.343-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><title type='text'>My Latestest infatuation with JSON - JavaScript Object Notation</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I&#39;m in love with &lt;a href=&quot;http://www.json.org/&quot;&gt;JSON, JavaScript Object Notation&lt;/a&gt;. It&#39;s old news, I know this and I&#39;m not that proud of it. But wise man once said, &quot;It&#39;s better late than never&quot;. I&#39;m currently addicted to using it. I am starting to go back to all NetSuite scripts I&#39;ve created to this date and seeing where I can incorporate JSON. &lt;br /&gt;
&lt;br /&gt;
I first used it when I worked on workaround for &lt;a href=&quot;http://knowledgesharecare.blogspot.com/2011/04/netsuite-things-ive-learned-so-far-got.html&quot;&gt;NetSuite Webstore Registration Process&lt;/a&gt;. The online Suitelet returns a JSON object which contains the result of search. I&#39;ve started using it since.&lt;br /&gt;
&lt;br /&gt;
I started using JSON as Mapping Table. I used JavaScript Arrays to store list of values and get them out but as you know, it&#39;s very&amp;nbsp;inefficient. I also used JavaScript Objects as well to store attributes.&lt;br /&gt;
&lt;br /&gt;
JavaScript Object to store Address info:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;var addr1=new Object();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr1.label=&#39;Company Address&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr1.add1=&#39;1234 Hello World&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr1.add2=&#39;#303&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr1.city=&#39;My City&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr1.state=&#39;My State&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr1.zip=&#39;99999&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;//second address&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;var addr2=new Object();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr2.label=&#39;Home Address&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr2.add1=&#39;999 Home World&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr2.add2=&#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr2.city=&#39;My City&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr2.state=&#39;My State&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;addr2.zip=&#39;44444&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;document.write(addr1.label);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;//This will write out Company Address on the screen&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;document.write(addr2.label);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;//This will write out Home Address on the screen&lt;/span&gt;&lt;/blockquote&gt;
JSON to store Address info:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;var addr={&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &quot;CompanyAddress&quot;: {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;label&quot;:&quot;Company Address&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;add1&quot;:&quot;1234 Hello World&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;add2&quot;:&quot;#303&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;city&quot;:&quot;My City&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;state&quot;:&quot;My State&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;zip&quot;:&quot;99999&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; },&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &quot;HomeAddress&quot;: {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;label&quot;:&quot;Home Address&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;add1&quot;:&quot;999 Home World&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;add2&quot;:&quot;&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;city&quot;:&quot;My City&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;state&quot;:&quot;My State&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;zip&quot;:&quot;44444&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;document.write(addr[&#39;CompanyAddress&#39;].label);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;//This will write out Company Address on the screen&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;document.write(addr[&#39;HomeAddress&#39;].label);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;//This will write out Home Address on the screen&lt;/span&gt;&lt;/blockquote&gt;
What I like about using JSON approach is that it is already treated as an Array. Array with unique id. I can also have Server side Suitelet to generate something like this and use eval(); to parse it as JSON.&lt;br /&gt;
&lt;br /&gt;
Take this as an example. Let&#39;s say someone registered from your website and provided series of addresses. If you have know exactly what you are looking for, you don&#39;t have to run a loop to find the right address. You can simply reference unique ID you gave and get related attributes for it just like above.&lt;br /&gt;
&lt;br /&gt;
You can also run loop against your JSON object by doing this:&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;for (_v in myJsonObj) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; document.write(myJsonObj[_v].attribute);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;//above will loop through all elements in myJsonObj and print out value for attribute&lt;/span&gt;&lt;/blockquote&gt;
Anyway, pretty simple yet powerful. Love LOVE using it!!!</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/1742339641293772736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/my-latestest-infatuation-with-json.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1742339641293772736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1742339641293772736'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/my-latestest-infatuation-with-json.html' title='My Latestest infatuation with JSON - JavaScript Object Notation'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-1682837910674492850</id><published>2011-05-25T21:31:00.002-04:00</published><updated>2011-09-04T12:38:03.563-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><title type='text'>Best Browser for NetSuite? - Post by Rob MacEwen from Audaxium</title><content type='html'>Check out this blog entry from Audaxium by Rob MacEwen. I personally like using Chrome and Firefox for development purposes. Chrome definitely seem to be more responsive compared to IE and Firefox.&lt;br /&gt;
&lt;br /&gt;
For development, I almost always use Firefox. Their Firebug work far better in Firefox than Chrome. I hate to &quot;Hate&quot; on IE but I only use them to test cross browser compatibility for Webstore customization.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blog.audaxium.com/2009/best-browser-for-netsuite/?sms_ss=blogger&amp;amp;at_xt=4dddad3b8a761683%2C0&quot;&gt;Best Browser for NetSuite?&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/1682837910674492850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/best-browser-for-netsuite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1682837910674492850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1682837910674492850'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/best-browser-for-netsuite.html' title='Best Browser for NetSuite? - Post by Rob MacEwen from Audaxium'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-9141926365502899951</id><published>2011-05-25T20:54:00.003-04:00</published><updated>2011-09-04T12:38:15.781-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Pardot"/><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><title type='text'>Getting Started with Pardot API in NetSuite</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Who is using &lt;a href=&quot;http://www.pardot.com/&quot; target=&quot;_blank&quot;&gt;Pardot &lt;/a&gt;for Email Marketing Automation? I don&#39;t directly work with Marketing Department to know ins and outs of Pardot but I do know it&#39;s pretty awesome email marketing automation tool. I&#39;ve seen my Marketing department create very effective unmanned drip marketing campaign through Pardot&#39;s automation workflow. Like every online software though, it&#39;s not perfect. However for what it&#39;s used for, I think it&#39;s pretty great software.&lt;br /&gt;
&lt;br /&gt;
They have API available so that other cloud based or home grown software can connect and integrate.&lt;br /&gt;
&lt;br /&gt;
As a developer, what does Pardot API mean? It means more work ;) No, no, it actually means you can take your website to new level of integration. Automated drip campaign based on activity your website visitors are doing? Access prospects information such as past activities, scores and display different sales related result pages? Well, I&#39;m sure your marketing department can come up with pretty fancy way of using it.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s start with the basics. Pardot&#39;s API is URL based. I found it pretty easy to use when integrating NetSuite and Pardot together. You can check out &lt;a href=&quot;http://developer.pardot.com/kb/api-version-3/overview&quot;&gt;Pardots&#39; API documentation&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I wrote about &lt;a href=&quot;http://knowledgesharecare.blogspot.com/2011/04/netsuite-pardot-integration.html&quot; target=&quot;_blank&quot;&gt;NetSuite - Pardot Integration&lt;/a&gt; before&lt;br /&gt;
&lt;br /&gt;
Step 1: You need to be able to get Authenticated into Pardot.&lt;br /&gt;
&lt;a href=&quot;http://developer.pardot.com/kb/api-version-3/authentication&quot; target=&quot;_blank&quot;&gt;Pardot API on Authentcation&lt;/a&gt;&lt;br /&gt;
Pardot URL: https://pi.pardot.com/api/login/version/3&lt;br /&gt;
Required Parameters: Email Address, Password, User Key&lt;br /&gt;
Request sent to Pardot using GET or POST method will return API Key if login was successful.&lt;br /&gt;
In NetSuite, you can use nlapiRequestURL() method to make a server call out to external webservices. &lt;br /&gt;
&lt;blockquote style=&quot;color: #3d85c6;&quot;&gt;
var loginUrl=&#39;https://pi.pardot.com/api/login/version/3?email=[pardotEmail]&amp;amp;password=[pardotPass]&amp;amp;user_key=[pardotKey]&#39;;&lt;br /&gt;
var authorizeResponse = nlapiRequestURL(loginUrl,null,null);&lt;br /&gt;
var xml=nlapiStringToXML(authorizeResponse.getBody());&lt;/blockquote&gt;
Javascript variable xml will contain result xml from Pardot. If successful, it will contain API Key. If unsuccessful, it will contain error code.&lt;br /&gt;
&lt;br /&gt;
Step 2: Use the API Key to perform actions against Pardot.&lt;br /&gt;
Once you have the API Key, you can perform actions against Pardot. User Key and API Key are fundamentally required parameters. Most of my actions were against Pardot prospects so below are my most widely used API URLs:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Prospect Search:&lt;br /&gt;
https://pi.pardot.com/api/prospect/version/3/do/read/output/full&amp;amp;user_key=[x]&amp;amp;api_key=[x]...&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Prospect Add:&lt;br /&gt;
https://pi.pardot.com/api/prospect/version/3/do/create/output/full&amp;amp;user_key=[x]&amp;amp;api_key=[x]...&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Prospect Update:&lt;br /&gt;
https://pi.pardot.com/api/prospect/version/3/do/update/output/full&amp;amp;user_key=[x]&amp;amp;api_key=[x]...&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
You can get pretty creative once you know the basics of how to use Pardot API. As I mentioned before, if your company is using NetSuite along with Pardot, it&#39;ll be extremely useful to create Pardot related library script.&lt;br /&gt;
&lt;br /&gt;
As I mentioned before, you can use Xpath to gain access to response XML from Pardot. With Pardot API, you can;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Create or Update Prospects&lt;/li&gt;
&lt;li&gt;Search for existing Prospects&lt;/li&gt;
&lt;li&gt;Add/Remove Prospects from Marketing Segmentations&lt;/li&gt;
&lt;li&gt;Add/Remove Prospects from Marketing Campaigns&lt;/li&gt;
&lt;li&gt;Access native and/or custom Pardot fields&lt;/li&gt;
&lt;/ul&gt;
I have one last thought. Both NetSuite and Pardot used together can be very powerful tool for your organization. If you lack in technical resources or you need to get something off the ground fast, do consider using external resources. One company in particular who&#39;s been great help is &lt;a href=&quot;http://www.audaxium.com/&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;Audaxium&lt;/b&gt;&lt;/a&gt;. They specialize in MS Dynamics, Pardot and NetSuite integration. Understanding the integration points between the two system and know what it can and can not do is critical to your business.</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/9141926365502899951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/getting-started-wit-pardot-api-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/9141926365502899951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/9141926365502899951'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/getting-started-wit-pardot-api-in.html' title='Getting Started with Pardot API in NetSuite'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-5311815104663788508</id><published>2011-05-24T10:53:00.000-04:00</published><updated>2011-09-04T12:38:37.339-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore Templates"/><title type='text'>Advanced Webstore Item templates</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I learned something cool last night. Do join me in celebrating my slow learning process of NetSuite.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Did you know you can set custom drill down webstore template at an individual item level?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Route I took to customizing look and feel of our webstore is to take a pre-designed template from NetSuite and modifying it. I can set default product drill down template for both Welcome and Product layouts.&lt;br /&gt;
For most folks, product drill down template doesn&#39;t have to be &quot;Special&quot;, but for me, it had to be special. Especially when item options varies and you have to apply special validations against it.&lt;br /&gt;
&lt;br /&gt;
If items in your webstore requires special attention for item detail page,&amp;nbsp;definitely look into using this.&lt;br /&gt;
&lt;br /&gt;
Try to abstract out different types of item detail page you&#39;d need and group them together. When you create your drill down templates, it&#39;ll be based on these grouping.&lt;br /&gt;
&lt;br /&gt;
You can gain access to creating different templates by going to Web Site Item/Category Templates page.&lt;br /&gt;
&lt;i&gt;Setup &amp;gt; Web Site &amp;gt; Item/Category Templates&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;br /&gt;
You can set individual drill down template per item by following these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;List &amp;gt; Accounting &amp;gt; Items &amp;gt; Select the webstore item you wish to add custom drill down template&lt;/li&gt;
&lt;li&gt;Click on Store or Webstore tab. (This depends on the item you&#39;ve selected)&lt;/li&gt;
&lt;li&gt;Next to &quot;Item Drilldown Template&quot;, select your newly created template&lt;/li&gt;
&lt;li&gt;Save&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
It&#39;s a small things that makes me happy these days. This saved me from coding different javascript validation for each items with varying item options.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/5311815104663788508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/advanced-webstore-item-templates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/5311815104663788508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/5311815104663788508'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/advanced-webstore-item-templates.html' title='Advanced Webstore Item templates'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-4990702328102726425</id><published>2011-05-21T12:33:00.000-04:00</published><updated>2011-09-04T12:38:56.083-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Pardot"/><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><title type='text'>Helpful JavaScript functions you may want to include in your Library Script</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We all need help sometimes. For me, I am not ashamed to look for help on the NetSuite Forum. Through out my experience with NetSuite deployment and customizations, I&#39;ve found following JavaScript functions to be extremely helpful and I hope it provides you with some help as well.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Contains function:&lt;/b&gt; I found this script from &lt;a href=&quot;http://css-tricks.com/snippets/javascript/javascript-array-contains/&quot;&gt;CSS-Tricks&lt;/a&gt; website.&lt;br /&gt;
It is most useful when you have array of objects, strings, numbers and you wish to check for existence of a value you pass it.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;Array.prototype.contains = function(arg) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; for (i in this) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; if (this[i]==arg) return true;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; return false;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;};&lt;/span&gt;&lt;/blockquote&gt;
Here is how you use it.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var myArray = new Array(&quot;123&quot;,&quot;555&quot;,&quot;888&quot;,&quot;999&quot;); //internal id of items&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;var itm = nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;item&#39;); //get item id of current line item&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;if (myArray.contains(itm)) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; alert(&#39;This Item exists in the Array!&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
It makes your code lot simpler and easy to read.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Empty filter value checker: &lt;/b&gt;While writing custom search, I came across some odd errors here and there. Turns out, when search filter value is null or empty, it throws an error. After reading documentation, it turns out that you have to use @NONE@ in place of empty or null value.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function emptyFilterCheck(_val) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; if (_val) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; return _val;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; return &#39;@NONE@&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;b&gt;&amp;nbsp;Send Email Function: &lt;/b&gt;I&#39;m sure most of you have this function separated out. This is my version of the send email. It takes 6 parameters. From ID, To ID, Subject, Message, Attach to Record ID, Record Type.&lt;br /&gt;
Script will attach email to a record if the value is passed in.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;function sendNotificationEmails(fromId, toId, strSbj, strMsg, attachToRecId, recType) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; //check for sandbox&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; if (env == &#39;SANDBOX&#39;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; strSbj=&#39;[SANDBOX] - &#39;+strSbj;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; } &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; try {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; //attach this email to record if defined&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; if (attachToRecId != null) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var rec = new Object();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (recType==null) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rec[&#39;entity&#39;]=attachToRecId;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (recType==&#39;transaction&#39; || recType==&#39;activity&#39;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rec[recType]=attachToRecId;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //This is custom record &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nlapiLogExecution(&#39;DEBUG&#39;,&#39;msg&#39;,&#39;This is custom record:&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rec[&#39;recordtype&#39;]=recType;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rec[&#39;record&#39;]=attachToRecId;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; nlapiSendEmail(fromId, toId, strSbj, strMsg, null, null, rec); &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; nlapiSendEmail(fromId, toId, strSbj, strMsg);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; return true; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; } catch(e) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; if (e instanceof nlobjError) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //Do your error handling here for e.getCode()and e.getDetails()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //Do your error handling for JavaScript issue: e.toString() &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; &amp;nbsp; } &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp; } &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
There are few others I&#39;m trying to put it. Just to give you an idea, here are list of potential helper functions I am creating:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Search function which takes array of filter fields, values, and records&#39; internal ID.&lt;br /&gt;
I found myself writing these codes over and over again.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Specialized Pardot API library sets.&lt;br /&gt;
If you use Pardot along with NetSuite, it&#39;s a good idea to create common function calls to Pardot. For example, LookupProspect(email), AddOrUpdProspect(email, JSONfldValObj), UpdProspectList(email, newList), UpdProspectCamp(email, newCampaign), GetActivities(email) just to name a few.&lt;br /&gt;
I plan to write some sample Pardot API calls from NetSuite that I&#39;ve written later.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Sublist related functions.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
What are some of your helper functions you are using?&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/4990702328102726425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/helpful-javascript-functions-you-may.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4990702328102726425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/4990702328102726425'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/helpful-javascript-functions-you-may.html' title='Helpful JavaScript functions you may want to include in your Library Script'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-3449152419777602220</id><published>2011-05-19T10:46:00.002-04:00</published><updated>2011-09-04T12:39:08.663-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Scriptable Cart"/><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><title type='text'>Working with Scriptable Cart in NetSuite Webstore - Lessons Learned</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It&#39;s been a while since my last post. I have a good reason. I&#39;ve been struggling with Scriptable Cart feature in NetSuite advanced Webstore. After close to 9 days of none stop work, I think I&#39;ve finally have it working.&lt;br /&gt;
&lt;br /&gt;
This is new feature NetSuite released and it&#39;s still in an infant stage yet very powerful when coded correctly.&lt;br /&gt;
First thing I struggled with the most was not being able to see scripts&#39; behavior when executed from the Webstore. You can read about on &quot;&lt;a href=&quot;http://knowledgesharecare.blogspot.com/2011/05/how-to-debug-netsuite-webstore.html&quot;&gt;&lt;b&gt;How to debug NetSuite Webstore Scriptable Cart&lt;/b&gt;&lt;/a&gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
This gave me some major insight as to how NetSuite Webstore processes each addition/subtraction of items in the cart.&lt;br /&gt;
&lt;br /&gt;
I want to give shout out to Jason K. for providing massive assistance in getting my cart script to work properly!&lt;br /&gt;
&lt;br /&gt;
Here are some things I&#39;ve found out that could help you:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;You can get execution environment variable using&amp;nbsp;nlapiGetContext().getEnvironment() call. I didn&#39;t think this was possible but using this in your cart script actually returns SANDBOX, BETA or PRODUCTION from webstore.&lt;br /&gt;
&amp;nbsp;This will be very handy if you have to switch item ID depending on the environments.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;nlapiCommitLineItem(&#39;item&#39;) Is a MUST Call if you want your recalc to correctly recalculate totals. I tried taking the easy way out by not calling commit. What a newb mistake that was.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;nlapiLookupField() call can not be used. Obviously right? Well, I made this mistake as well. You may have an instance where you need to create item list table to add&amp;nbsp;pro grammatically. I highly recommend using JSON object to create your item look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;User selected items will ALWAYS be at line number 1 of the cart. The order of items may change after you&#39;ve been to check out summary page but when it&#39;s added to the cart by the user; not script, it&#39;ll always be on the first line of item list.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Jason K&#39;s trick 1&lt;/b&gt;: nlapiSelectLineItem results in an error if there&#39;s uncommitted values in the item list. He recommended to commit all items before adding new.&lt;br /&gt;
I especially had issues with this. My work around was to use nlapiInsertLineItem with nlapiSetCurrentLinetItemValue method.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Not sure if this will apply to everyone but IF you end up getting NetSuite Script Notice page during your execution of cart script or you end up getting Webstore maint. screen, it usually means there is an error in your script. For me, it was infinite loop issue. If you see your form re-initializing, it usually indicates error.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Jason K&#39;s trick 2&lt;/b&gt;: Using global variable in the cart script sometimes fails. The workaround is to create custom body field on your form and use that as temporary global field that you set and get using nlapiGetFieldValue() call.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Jason K&#39;s trick 3&lt;/b&gt;: When doing extra commit, always check for valid item in the current row.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Some quick sample code from Jason K on safeSelectLine and safeSelectNewLine&lt;br /&gt;
&lt;br /&gt;
** &lt;b&gt;&lt;i&gt;notEmpty&lt;/i&gt;&lt;/b&gt; is a custom function which simply checks to see if passed in value is null or empty string&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;safeSelectNewLine function:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;function safeSelectNewLineItem() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; if (notEmpty(nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;item&#39;))) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; nlapiCommitLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; nlapiSelectNewLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;b&gt;&lt;i&gt;safeSelectLine function:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;function safeSelectLineItem(itemLine) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; if (notEmpty(nlapiGetCurrentLineItemValue(&#39;item&#39;,&#39;item&#39;))) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; nlapiCommitLineItem(&#39;item&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; nlapiSelectLineItem(&#39;item&#39;, itemLine);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
Most important lesson I&#39;ve learned is that cart script behaves differently in webstore. Do test your code on the external form but&amp;nbsp;be extra careful&amp;nbsp;not to fully trust the result. When testing on webstore, keep close eye on your log execution files. If you ever see page init more than once, you know you have an error somewhere.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As I mentioned before on my previous post, turning on logging on webstore will slow down your cart since it&#39;s calling to your external suitelet so keep that in mind as well.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hope this helps you. Let me know if you get stuck. I&#39;ll try my best to help you out.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/3449152419777602220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/working-with-scriptable-cart-in.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/3449152419777602220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/3449152419777602220'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/working-with-scriptable-cart-in.html' title='Working with Scriptable Cart in NetSuite Webstore - Lessons Learned'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-1138636051508787446</id><published>2011-05-14T13:36:00.005-04:00</published><updated>2011-09-04T12:39:21.442-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Scriptable Cart"/><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><title type='text'>How to debug Netsuite Webstore Scriptable Cart</title><content type='html'>&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large; font-weight: normal;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Notice:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Blogspot had issues with their server and post I originally wrote got deleted. I do apologize for missing link:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;Important Update on this Post: 5/17/2011:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;nlapiRequestURL() eats up API Governance meter by 10 points&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;.&lt;/span&gt;&amp;nbsp;Testing on External Form, if you have this turned on, you only have 1000 limit. On Webstore, you seem to have 2147483647. Don&#39;t ask me where that number came from.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
So, Here I go again. How DO you debug scriptable cart executing on webstore? The script itself is attached to the External Sales Order form you create which implies is client level script. You can&#39;t use Firebug to step through it either.So how do you debug when your script is not returning the results you want?&lt;br /&gt;
&lt;br /&gt;
I began using this workaround and it has helped me alot.&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Workaround: Create &lt;i&gt;Suitelet (Available without Login)&lt;/i&gt; to track printing of debug messages and call it using &lt;i&gt;nlapiRequestURL()&lt;/i&gt; from your scriptable cart script.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Write Suitelet Script: Save as &quot;sl_writelog.js&quot; and push out to Netsuite&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
** Please note, for simplicity, I&#39;ve written my script to use GET event.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;function slExecLog(request, response){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; if (request.getMethod() == &#39;GET&#39;) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; var log = filterUserInput(request.getParameter(&#39;log&#39;));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; var title=filterUserInput(request.getParameter(&#39;title&#39;));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; writeLog(&#39;DEBUG&#39;,title,log);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; response.write(&#39;called back&#39;); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;b&gt;Deploy your script:&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Login to Netsuite and go to Setup &amp;gt; Customization &amp;gt; Scripts &amp;gt; Click New&lt;/li&gt;
&lt;li&gt;Select Suitelet as script type&lt;/li&gt;
&lt;li&gt;Provide Name and ID for this script.&lt;/li&gt;
&lt;li&gt;Under Scripts tab, select &quot;sl_writelog.js&quot; for Script File and &quot;slExecLog&quot; as Function&lt;/li&gt;
&lt;li&gt;Select &quot;Save and Deploy&quot; option.&lt;/li&gt;
&lt;li&gt;Provide Name and ID for this script deployment&lt;/li&gt;
&lt;li&gt;Check &quot;Available Without Login&quot;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;Select GET Request as Event Type.&lt;br /&gt;
If you choose to use Post, you should change your script to check for POST and also select POST Request as Event Type&lt;/li&gt;
&lt;li&gt;Under Audience tab, select &quot;All Roles&quot;&lt;/li&gt;
&lt;li&gt;Save&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Once you&#39;ve deployed your script, copy the External URL for this deployment. According to NetSuite documentation, nlapiRequestURL() does NOT send User Session information.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Link to your Suitelet from Scriptable cart script:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Open your scriptable cart script and create a function which will call your suitelet. This is how I did it:&lt;br /&gt;
Please note that anything enclosed in [ and ] is to be replaced by your code including the brackets.&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;function wslog(_txt) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; if (!_txt) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; return;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; var loginUrl = &#39;[External URL for your Suitelet]&amp;amp;title=[Value of title]&amp;amp;log=&#39;+_txt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; if (wsdebug) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; nlapiRequestURL(loginUrl, null, null);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; return; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; }else{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; &amp;nbsp; alert(_txt);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
You will notice above that I check for wsdebug value. This is global boolean value I created so that I can turn on/off calling of my debug suitelet.&lt;br /&gt;
When I&#39;m testing on the form, I set this value to false so that I can see the alert messages. Testing/deployment on webstore, I set this value to true.&lt;br /&gt;
&lt;b&gt;Check your debug messages:&lt;/b&gt;&lt;br /&gt;
Once everything is doen, go to your Webstore and add items to your cart so that your scriptable cart script will fire.&lt;br /&gt;
To check the log messages, open your Suitelet script record and click on Execution Log.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/1138636051508787446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/how-to-debug-netsuite-webstore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1138636051508787446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/1138636051508787446'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/how-to-debug-netsuite-webstore.html' title='How to debug Netsuite Webstore Scriptable Cart'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-2668554587714876590</id><published>2011-05-09T21:17:00.001-04:00</published><updated>2011-09-04T12:39:38.143-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><title type='text'>NetSuite - Item Options on Webstore</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I&#39;ve been over working my brain on trying to dynamically set item options through Scriptable Checkout on the Webstore.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve search long and hard on NetSuite forum and from what everyone says, it should work. In fact, I&#39;ve tested out my code on External Sales Order form and It DOES Work. However, when you actually walk through the process of purchasing an item in Webstore, script never fires.&lt;br /&gt;
&lt;br /&gt;
Here is what I did. &lt;b&gt;I believe you need Advanced Webstore Capability&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Under Setup &amp;gt; Customization &amp;gt; Transaction Forms, Create two new Sales Order (External) forms; one for cash sales and one for invoices.&lt;/li&gt;
&lt;li&gt;Attached script I want to use to each of the external forms I created.&lt;/li&gt;
&lt;li&gt;Under Setup &amp;gt; Web Site &amp;gt; Set up Web site &amp;gt; Setup Tab, I set up the following:&lt;br /&gt;
&lt;b&gt;Scriptable Cart and Checkout: &lt;i&gt;Checked&lt;/i&gt;&lt;br /&gt;
Scripting Template (Credit Card): &lt;i&gt;Points to Sales Order (External) Cash Sales form&lt;/i&gt;&lt;br /&gt;
Scripting Template (Invoice): &lt;i&gt;Points to Sales Order (External) Invoice form&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
One of the best tip given by NetSuite developer was this:&lt;/div&gt;
&lt;blockquote&gt;
&lt;b&gt;&lt;i&gt;&quot;Aways test your external form internally before you begin testing on Web Store&quot;&lt;/i&gt;&lt;/b&gt;&lt;/blockquote&gt;
I followed his advice and began testing my code internally. You can do this by going to Setup &amp;gt; Customization &amp;gt; Transaction Forms, and click on one of the external form link; not the edit link but the form name. &amp;nbsp;This will bring up empty form.&lt;br /&gt;
&lt;br /&gt;
All your function you defined will fire as you fill in the form. By testing the form internally, I saw that Item Options were being set on the item line item.&amp;nbsp;&amp;nbsp;HOWEVER, same code, same form doesn&#39;t behave the same when executed from Web Store.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;I&#39;m really hoping SOMEONE FROM NetSuite WILL ANSWER MY QUESTION!!!!!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;The Workaround:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
If you guys every need to accomplish something like this, my suggestion is to handle it through User Event Script.&lt;br /&gt;
I personally set up my User Event to fire on After Submit.&lt;br /&gt;
&lt;br /&gt;
You create your server-side User Event script and deploy it to Sales Order record. You can code your script to ONLY fire when Sales Order is from your webstore. You can do this by checking for &quot;leadsource&quot; field value.&lt;br /&gt;
&lt;br /&gt;
At this point, you gain access to all server-side script including the ability to manipulate the item list.&lt;br /&gt;
&lt;br /&gt;
Some key points to remember:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Any manipulation you do, make sure it doesn&#39;t affect what your customer has already provided. &lt;b&gt;Newly Altered version of Sales Order will be emailed to customer. &lt;i&gt;** If you have it set up that way&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;NetSuite support indicated that they fixed a bug with Rev. Rec. Schedule not pulling down from Item record. It is STILL BROKEN FOR US! You can get around it by using this script.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
If Anyone has a work around for this issue, PLEASE PLEASE message me. I&#39;d love to hear how you got it fixed!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/2668554587714876590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/netsuite-item-options-on-webstore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/2668554587714876590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/2668554587714876590'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/netsuite-item-options-on-webstore.html' title='NetSuite - Item Options on Webstore'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-589534384789353065</id><published>2011-05-06T00:09:00.002-04:00</published><updated>2011-09-04T12:39:51.009-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Webstore"/><title type='text'>Separating Name field to First and Last Name in NetSuite Webstore</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
NetSuite, I have bones to pick with you! Why would you just put Name field on e-commerce registration form? WHY???!?!?!?!&lt;br /&gt;
&lt;br /&gt;
Well, until they put in a fix for it, I do have a work around for those who wish to use it.&lt;br /&gt;
If you have already customized your webstore, most likely you have script files you are placing on the header of your web site theme.&lt;br /&gt;
&lt;br /&gt;
For this purpose, create a new JavaScript file. For now create a function called checkPage().&lt;br /&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;function checkPage() {&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&amp;nbsp;Save and load it to your live hosting folder and place a reference to it at the header of your website theme.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Append functions to body tag:&lt;/b&gt;&lt;br /&gt;
Open your theme by going to Setup &amp;gt; Website &amp;gt; Theme &amp;gt; [Your Theme]&lt;br /&gt;
Under General tab, please reference to your new javascript file on &quot;Addition to &amp;lt;head&amp;gt;&quot;.&lt;br /&gt;
Also under general tab, append your new function call next to &quot;page_init()&quot;.&lt;br /&gt;
&lt;br /&gt;
Your body tags&#39; onload call should look like this: onload=&quot;page_init(); checkPage();&quot;&lt;br /&gt;
&lt;br /&gt;
Doing this will call your checkPage() every time different sections of your webstore is loaded.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Finding field info:&lt;/b&gt;&lt;br /&gt;
The name text box should have id and name of &quot;name&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sudo Coding:&lt;/b&gt;&lt;br /&gt;
What we wanna do is this:&lt;br /&gt;
1. Find name text box and do the following:&lt;br /&gt;
- Change type from text to hidden&lt;br /&gt;
- Clear onfocus and onchange. This may not be necessary&lt;br /&gt;
2. Create first name text box element&lt;br /&gt;
- Add id of fname (your choice)&lt;br /&gt;
3. Create last name text box element&lt;br /&gt;
- Add id of lname(your choice)&lt;br /&gt;
4. Place the two elements where original name text box was&lt;br /&gt;
5. Write validation script to check for missing values for the two.&lt;br /&gt;
6. IF validation passes, set the value of now HIDDEN name field with first and last name provided. (VERY IMPORTANT STEP)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Lets add the meat to our script:&lt;/b&gt;&lt;br /&gt;
I found that registration page has specific form called &quot;newcust&quot;. Checking for existence of this form will be our queue to begin our modification process.&lt;br /&gt;
Oh BTW, if you know jQuery, more power to ya. It&#39;ll be much easier &lt;br /&gt;
&lt;br /&gt;
Here is the code:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;function checkPage() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//find out if registration form exists&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;var regform = document.forms[&#39;newcust&#39;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (regform !=null) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;var ntx = regform.name;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ntx.setAttribute(&#39;type&#39;,&#39;hidden&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ntx.onfocus=&#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;ntx.onchange=&#39;&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//get span node that wraps name text box&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;var cellspan = ntx.parentNode;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;var fnamebox = document.createElement(&#39;input&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;var txtNode = document.createTextNode(&#39; &#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;var lnamebox = document.createElement(&#39;input&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fnamebox.setAttribute(&#39;type&#39;,&#39;text&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fnamebox.setAttribute(&#39;id&#39;,&#39;fname&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fnamebox.setAttribute(&#39;onfocus&#39;,&quot;txtChange(&#39;fname&#39;,&#39;First Name&#39;);&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fnamebox.setAttribute(&#39;onblur&#39;,&quot;txtChange(&#39;fname&#39;,&#39;First Name&#39;);&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;fnamebox.value=&#39;First Name&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lnamebox.setAttribute(&#39;type&#39;,&#39;text&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lnamebox.setAttribute(&#39;id&#39;,&#39;lname&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lnamebox.value=&#39;Last Name&#39;;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lnamebox.setAttribute(&#39;onfocus&#39;,&quot;txtChange(&#39;lname&#39;,&#39;Last Name&#39;);&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lnamebox.setAttribute(&#39;onblur&#39;,&quot;txtChange(&#39;lname&#39;,&#39;Last Name&#39;);&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cellspan.appendChild(fnamebox);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cellspan.appendChild(txtNode);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cellspan.appendChild(lnamebox);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;//just helper function to switch between default values.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;function txtChange(_id, _text) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;var el = document.getElementById(_id);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (el &amp;amp;&amp;amp; el.value == _text) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;el.value=&#39;&#39;;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}else if(el &amp;amp;&amp;amp; el.value==&#39;&#39;) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;el.value=_text;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;This should do it. You just need to now add validation script (Sudo code step 5 &amp;amp; 6) for onsubmit.&lt;/span&gt;&lt;br /&gt;
If validtion passes, you can do something like this.&lt;br /&gt;
&lt;br /&gt;
var fname=document.getElementById(&#39;fname&#39;).value;&lt;br /&gt;
var lname=document.getElementById(&#39;lname&#39;).value;&lt;br /&gt;
document.getElementById(&#39;name&#39;).value = fname+&#39; &#39;+lname;&lt;br /&gt;
&lt;br /&gt;
This isn&#39;t the only way you can do this. I just wanted to show you guys that it IS possible to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/589534384789353065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/separating-name-field-to-first-and-last.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/589534384789353065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/589534384789353065'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/05/separating-name-field-to-first-and-last.html' title='Separating Name field to First and Last Name in NetSuite Webstore'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-216895983971631676</id><published>2011-04-29T15:38:00.001-04:00</published><updated>2011-09-04T12:40:06.814-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="SuiteScript"/><title type='text'>NetSuite - Scripting/Debugging Tips I&#39;ve learned so far</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
NetSuites&#39; SuiteScript is JavaScript based language which allows developers to really get down and dirty with truly customize NetSuite.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Like finger prints, not all businesses are alike. NetSuite tries pretty hard to meet the requirements of each and every businesses that are out there but it&#39;s an impossible task. That&#39;s why they have SuiteScript to build out your own, business specific customizations.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here are some tips on scripting/customizing/debugging that I&#39;ve picked up so far:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Download and install Chrome or FireFox. JavaScript Debugger, Firebug is a must have tool. It allows you to set break points so that you can successfully debug your custom scripts.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Take advantage of NetSuite Debugger. This is really good for unit testing your code. Write snippets of your code and execute it on NetSuite Debugger and verify your script behaves properly.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Abstract out common functions and create utility script. I&#39;m sure everyone is already doing this. I mean who really wants to write out nlapiLogExecution or nlapiSendEmail?!?!?!!?! Way too long!&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Unless you HAVE to... avoid using nlapiLoadRecord. If you are doing simple field value search or field updates, nlapiLookupField and nlapiSubmitField will do just fine. Only time I found myself using nlapiLoadRecord is when I had to drill down to sublists. I&#39;m really hoping NetSuite will come up with function to do just this&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;For Webstore customization, get to know what IS customizable. I recently had to customize login pages text and links on our Webstore. It turns out, all the text and links are customizable through Setup &amp;gt; Website &amp;gt; Customize Text&lt;br /&gt;
If you are going to use Webstore, it really REALLY helps to purchase Advanced Web Module.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
Ok.. That&#39;s what I have so far... &amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/216895983971631676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/04/netsuite-scriptingdebugging-tips-ive.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/216895983971631676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/216895983971631676'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/04/netsuite-scriptingdebugging-tips-ive.html' title='NetSuite - Scripting/Debugging Tips I&#39;ve learned so far'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-2534573896913597659</id><published>2011-04-26T10:19:00.002-04:00</published><updated>2011-09-04T12:40:24.165-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><category scheme="http://www.blogger.com/atom/ns#" term="Pardot"/><title type='text'>NetSuite - Pardot Integration</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Couple weeks ago, I saw a quick post on &lt;a href=&quot;http://www.facebook.com/NetSuite&quot;&gt;NetSuite&#39;s fan page on Facebook&lt;/a&gt;&amp;nbsp;on &lt;a href=&quot;http://www.pardot.com/&quot;&gt;Pardot&lt;/a&gt;. For those of you who are not familiar with Pardot, they are marketing automation provider. It&#39;s pretty awesome tool for Marketing department.&lt;br /&gt;
&lt;br /&gt;
Pardot offers OOB, easy setup to connect with either NetSuite. It offers connectors for other CRM tools as well. Here is a catch; you can only connect to ONE CRM tool. It makes sense. First of all, you wouldn&#39;t want to have multiple CRM ran within your company. That&#39;s serious waste of money.&lt;br /&gt;
&lt;br /&gt;
Anyway, one issue that I found with NetSuite connector; while it works well with minimum setup effort, it is highly limited in customization. Pardot set the ground rules how leads/customers/prospects will get synced between the two system and you really don&#39;t have much say in it.&lt;br /&gt;
I have submitted an enhancement request for this with Pardot but it&#39;s not really going anywhere.&lt;br /&gt;
&lt;br /&gt;
What is an alternate solution? You can take advantage both NetSuite and Pardot API to sync between the two system. It takes some work Pardot API is available &lt;br /&gt;
&lt;br /&gt;
When you look at NetSuite documentation, you will see&amp;nbsp;&lt;b&gt;nlapiRequestURL()&lt;/b&gt; method call. You can use this to connect out to Pardot API. You can use&amp;nbsp;&lt;b&gt;nlapiStringToXML() &lt;/b&gt;to get response body back and convert it to XML and from there you can get any values you want out of it.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;YOU DO NEED TO KNOW XPath. You can get a quick tutorial from &lt;a href=&quot;http://www.w3schools.com/xpath/&quot;&gt;W3Cschool&lt;/a&gt;.&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt; &lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
Pardot API documentation has good amount of information on getting up to speed on using API usage.&lt;br /&gt;
&lt;br /&gt;
I think this method is far less intrusive compared to OOB Pardot to NetSuite connector and you have full control over what information comes back and go out.&lt;br /&gt;
&lt;br /&gt;
One Note: You will need to use this as Scheduled Script in NetSuite and from time to time, you will get following errors from Pardot:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Invalid API Key&lt;/li&gt;
&lt;li&gt;Request Time out.&lt;/li&gt;
&lt;li&gt;Exceeded Time out.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
It happens from time to time. Nothing serious to worry about. Just make sure you code accordingly.&lt;/div&gt;
&lt;div&gt;
Happy coding!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/2534573896913597659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/04/netsuite-pardot-integration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/2534573896913597659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/2534573896913597659'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/04/netsuite-pardot-integration.html' title='NetSuite - Pardot Integration'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8455772073626756381.post-7549563387489133914</id><published>2011-04-23T16:27:00.000-04:00</published><updated>2011-09-04T12:40:52.737-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NetSuite"/><title type='text'>NetSuite - Things I&#39;ve Learned So far... The &quot;GOT YA&quot;!</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;We&#39;ve MOVED!!!!&amp;nbsp;&lt;a href=&quot;http://www.codeboxllc.com/ksc&quot;&gt;www.codeboxllc.com/ksc&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I&#39;ve been working with NetSuite for little over a year now. Yes, not much of experience to be writing Blog about it. I do consider myself as NetSuite Newb so don&#39;t hate.&lt;br /&gt;
&lt;br /&gt;
Anyway, I&#39;ve compiled some list of things I&#39;ve learned so far.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Rev. Rec. Schedule, Product and Department from items are not automatically pulled over to Sales Order when an item is purchased from the Webstore.&lt;br /&gt;
&amp;gt; NetSuite claims to have the Product/Department issue fixed in 2010.2 but I&#39;m not seeing it. &lt;br /&gt;
&lt;b&gt;Work around&lt;/b&gt;: Created after submit User Event script against a Transaction type to set these info manually.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Item Groups are NOT allowed to be sold in the Webstore.&lt;br /&gt;
This became a big issue for us because Item Group was the one that you can pick and choose which items you want to sell as a group and still have taxes applied at individual component level. We sell that exact product type and it does NOT allow to be sold in the Webstore.&lt;br /&gt;
&amp;gt;I believe there is enhancement request out there for this and I am hoping that it&#39;ll be put in soon.&lt;br /&gt;
&lt;b&gt;Work around: &lt;/b&gt;Scriptable cart/check out. Keep in mind, I believe you need to have advanced webstore module for this work for ya. My work around was to sell Item Kit (not taxlable) and using scriptable cart/check out, dynamically added Taxable item to the cart. This was pretty tricky putting in but it works like a charm.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Don&#39;t trust workflow. Yes. most of you may disagree for I&#39;ve seen forum posts raving reviews on workflows. It doesn&#39;t work for me. =(&lt;br /&gt;
&amp;gt;Issue #1: No way to properly debug workflow. Yes, you can set it in test mode but it&#39;s very difficult to see what actually is going on at each step.&lt;br /&gt;
&amp;gt;Issue #2: Not enough documentation.&lt;br /&gt;
&amp;gt;Issue #3: What is UP WITH SET FIELD VALUE not working.&lt;br /&gt;
&lt;b&gt;Work around:&lt;/b&gt;&amp;nbsp;If you must use workflow, my suggestion is to use it in conjuction with form level client script.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;You only get &lt;b&gt;12 Sandbox refresh per year&lt;/b&gt;.&lt;br /&gt;
Ok, I think this is an extreme newb mistake. No one really said anything about it and the customer service never mentioned it when we requested refresh. We had many in the beginning.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;SuiteScript is a gift and a curse. It lets you customize to your hearts&#39; content but yet so confusing to keep track of it all.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Ok.. I&#39;m done bitching about it for today. Need to get some work done.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowledgesharecare.blogspot.com/feeds/7549563387489133914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/04/netsuite-things-ive-learned-so-far-got.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/7549563387489133914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8455772073626756381/posts/default/7549563387489133914'/><link rel='alternate' type='text/html' href='http://knowledgesharecare.blogspot.com/2011/04/netsuite-things-ive-learned-so-far-got.html' title='NetSuite - Things I&#39;ve Learned So far... The &quot;GOT YA&quot;!'/><author><name>M.H. (Joe) Son</name><uri>http://www.blogger.com/profile/06436332237349906292</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>