My Stuff
Nominate Your Peers for NetSuite Support Community's Choice of the Quarter! Submit your nomination today.
Intelligent Payment Automation version 1.0.3 is now available in the SuiteApp Marketplace. The SuiteApp, powered by BILL, lets you automate payments, manage vendor details, and bank account information within NetSuite. Learn more
No Limits. Just possibilities.
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Comments
-
@Richard James Uri-Oracle With "type" being a required load field, I can only specify what type of order to load. In this case, a Sales Order. I tried to log debug the record.load var, but I would get the INVALID_TRANS_TYP error and none of my debug logs would be recorded. Is there a way for me to tell the script what to…
-
Hello @Richard James Uri-Oracle No problem, Am I able to pull the record type from the createdfrom value? If I can't do this, then I have to catch the error. I have the error module ready to use on my script and I know the exact error that will continue to occur.
-
Hello @Richard James Uri-Oracle I actually stumbled upon that article when I began researching the error. But the code is over 10 years old. The solution seemed to have been pulling the wrong ID, in this case, my const could be the issue, as I specify the sales_order. I was thinking that I may need to further customize the…
-
Hello @Richard James Uri-Oracle , I seem to get an INVALID_TRANS_TYP error when special order POs are generated from a work order. Since my var requests only sales orders, I don't need to reference other order types. Is there a way I can tell the script if error is INVALID_TRANS_TYP, then return? I tried adding the…
-
Hello @Richard James Uri-Oracle I figured it out, after I set the value, I must commit after. Once committed, I set he command to save the record and the values are changed! /** * @NApiVersion 2.1 * @NScriptType UserEventScript * @NModuleScope SameAccount */ define(['N/record', 'N/currentRecord','N/log'],…
-
Hello @Richard James Uri-Oracle I read through the save and save.promise articles and it appears that I am unable to use the save method. This method is not available to subrecords. Is there another method I would need to use?
-
Hello @Richard James Uri-Oracle It appears that I needed to add isDynamic, once I added it the record loaded. const salesOrderRecord = record.load({ type: record.Type.SALES_ORDER, id: salesOrderId, isDynamic: true }); In the Application Suite, they labeled this an optional value. I did not consider this an option, and…
-
Hello @Richard James Uri-Oracle I added the log.debug, but I still ran into the same error after creating a special order PO. TypeError: Cannot read property 'SALES_ORDER' of undefined [at Object.UpdateSO (/SuiteScripts/Commission-PO-Update-SO.js:17:26)] If salesOrderRecord is appearing as undefined, then the script won't…
-
Hello @Richard James Uri-Oracle Awesome! so it looks like that the Order ID is coming over, I looked at the execution log and got the ID 1199381, which is the internal ID of the SO im referencing. But I got the same error, TypeError: Cannot read property 'SALES_ORDER' of undefined I reviewed the Oracle doc and it appears…
-
Hello @Richard James Uri-Oracle , Upon checking deployments, I noticed that "deployed" was unchecked. After checking deployed, I ran a special order PO and I got this error. TypeError: Cannot read property 'SALES_ORDER' of undefined It might be stemming from this const salesOrderId = newPO.getValue({ fieldId: 'createdfrom'…
-
Hello @Richard James Uri-Oracle Yes, I can process a special order PO and I'll return to the Sales Order immediately after. The expectation is that the commission value is recalculated for each line item on the Order after the PO is submitted and we land back on the Sales Order. I did add the log.debug and added the log…
-
Hello @Richard James Uri-Oracle Thanks, I approached this again as an afterSubmit function. I can get the script to work without error, but nothing happens. I do have the deployment set to PO. Theoretically, it should work. Am I missing a step? What about a beforeLoad function for the SO deployment? /** * @NApiVersion 2.1…
-
Hello @Joahnna Given Uy-Oracle I was able to get my script to work, I had to add different events in order to get it to work, /** * @NApiVersion 2.1 * @NScriptType ClientScript * @NModuleScope SameAccount */ define(['N/currentRecord','N/record'], (currentRecord,record)=>{ const CommLoad = (context)=>{ var currRecord =…
-
Hello @Joahnna Given Uy-Oracle How would I be able to create a currecord.CommitLine function? I think that this will workout for what I need to accomplish, since you have to commit any rate changes or when adding new line items. Would it be possible that if a line is committed, I can run the same calculation script?
-
Hello @Joahnna Given Uy-Oracle , I made progress with my script! /** * @NApiVersion 2.1 * @NScriptType ClientScript * @NModuleScope SameAccount */ define(['N/currentRecord'], (currentRecord)=>{ const pageInit = (context)=>{ var currRecord = context.currentRecord, lines = currRecord.getLineCount({ sublistId: 'item' });…
-
Hello @Joahnna Given Uy-Oracle , That's what I've been trying, so far my attempts have been unsuccessful. I think that the problem I have may be that I am not setting the COMM % value correctly. Is this correct? Assuming that everything works, is this how I would update a transaction line field that has a dropdown? The…
-
Hello @Joahnna Given Uy-Oracle Thanks! For 107793 and 95093, this is the same code that is used for 94464. This is what I based my code off, this code updates the SO, but it does not add a value to the line item itself. For 41288, this is more for the webstore itself, would I be able to use a similar structure in the NS…
-
Update, I redid the script and still got the same error at the end. Environment: SandBox Date & Time: 08/18/2023 07:35 am Execution Time: 0.00s Script Usage: 0 Script: comm percentage Type: User Event Function: afterSubmit Error: ReferenceError ReferenceError: error is not defined [at Object.afterSubmit…
-
Hello everyone, Update. I added my script and got it to deploy onto the quote and SO but I ran across this error. ReferenceError: error is not defined [at Object.afterSubmit (/SuiteScripts/Commission-SO-Q-Litem.js:157:23)] Seems to be the last part of the error. throw error.create({ name: 'Unexpected Error', message:…
-
Hello @Joahnna Given Uy-Oracle Would I be able to test this on my sandbox account without authorizing a card? If so, then I can try coding it myself to get the the script working correctly.
-
Hello @Joahnna Given Uy-Oracle I am trying to implement a conversion tracking script. We do have it setup in our config, but we're wanting to now collect ecommerce data. I planned to integrate the script onto the order_wizard_confirmation_module.tpl I would try creating the {#if} and {#each} statements myself in the…
-
Hello @Joahnna Given Uy-Oracle That is whole script above. I am not sure how I would create the each help for it.
-
@Nicole Mendoza-Oracle Thanks! that part will be fore me!
-
@Mark Vargas-Oracle @Richard James Uri-Oracle The duplicates were not appearing when we removed the product ID field; I still don't understand how that particular field could produce duplicates. When comparing to a field, such as "Category" it's understandable for that to create duplicates. Nonetheless, the issue has been…
-
@Nicole Mendoza-Oracle Thanks! I'll read up on N/search and see how I can develop this. Would I be able to test this script on a CMS page? Would I be able to run this same script online?
-
Hello @Mark Vargas-Oracle , That was the issue! was very strange because that field is only a regular field, didn't expect it to create duplicates.
-
Hello @Thea Hernandez-Oracle Thanks for the update! The TPL files should also appear on the manifest. I thought that as long as the files were created and added to the manifest, that would be all that I needed to do.
-
Hello @Richard James Uri-Oracle , Yes! I saved the templates under my theme Modules -> Facets -> Templates and deployed. I went to the config after reactivating the theme, and the templates didn't appear.
-
Hello @Leonard Mallare-Oracle Update: I managed to tuck the code into the facets_facet_browse.tpl file I used the {{keywords}} handlebar to get this to work! <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "url": "site.com", "potentialAction": { "@type": "SearchAction", "target":…
-
Hello Leonard, I think that I may have found what I needed, I went to the itemsearcher_item.tpl I'll try to integrate the JSON here. as I have the handlebar {{currentQuery}} { "@context": "https://schema.org", "@type": "WebSite", "url": "https://www.site.com", "potentialAction": { "@type": "SearchAction", "target":…