https://netsuiteprofessionals.com logo
Join Slack
Powered by
# suitescript
  • c

    Craig

    06/18/2025, 10:14 AM
    moment.js being mutable is a pain. What're people using instead of moment?
    👀 1
    w
    e
    +4
    • 7
    • 10
  • t

    texmc

    06/18/2025, 7:10 PM
    would anyone know what the https timeout is serverside? I remember it being 45 secs
    👍 1
  • j

    Jacob D

    06/18/2025, 10:55 PM
    Anybody know how I use getValue to reference a column in a saved search that's a numeric formula when I have multiple columns that are also numeric formulas?
    m
    d
    • 3
    • 2
  • j

    Jacob D

    06/18/2025, 10:58 PM
    I'm using the summary MIN, but logging the search results just gives me this:
    "MIN(formulanumeric)":"0","MIN(formulanumeric)_1":"0","MIN(formulanumeric)_2":"0"
    I've tried formulanumeric, formulanumeric_1, formulanumeric_2, but that doesn't work. I've tried creating the columns in the script and giving it a custom name, but that doesn't work either...
  • j

    Jacob D

    06/18/2025, 11:03 PM
    Never mind. I guess creating the columns with a custom name in the script does work. I think I was just referencing them wrong:
    Copy code
    nSearch.createColumn({
        name: 'formulanumeric1',
        summary: 'MIN',
        formula: 'CASE WHEN {memberitem.inventorylocation} = {memberitem.preferredlocation} THEN NVL({memberitem.locationquantityavailable}, 0) END'
    })
    🫡 1
    m
    • 2
    • 1
  • a

    Armanda

    06/19/2025, 3:03 AM
    Hi EveryOne How do I prevent the GL impact from forming immediately when creating an Item Receipt transaction? Can I use a user event script? Thank you.
    m
    • 2
    • 1
  • s

    Sarim Khan

    06/19/2025, 9:56 AM
    Hi all. With a UserEvent script (deployed on Sales Order record) I want to add Promotion line(s) with my custom PURCHASE DISCOUNT BUT whenever I try to do so it seems like NetSuite reverts my set value back to original calculated value. For example: I tested this on client side (screenshot attached), when using nlapiSetCurrentSublistValue() I am able to set the PURCHASE DISCOUNT to -800 but when I click on "OK" button, NetSuite revert the value back to -229.98. Any idea how can we set the value of PURCHASE DISCOUNT in promotions sublist? Or is it even feasible? Thank you
  • s

    Slava

    06/19/2025, 10:46 AM
    Hi all, I have dummy question regarding debugging UserEvent scripts. I have trouble to debug afterSubmit in Script Debugger. According to NS documentation https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_160833600356.html#To-create-the-user-event-script-and-start-the-debugger%3A in order to debug afterSubmit entry point you need to launch 'Debug Existing' script before you click 'Save' in UI. Then it opens debugger for beforeSubmit event. Then when I finishing debugging beforeSubmit it shows me a message 'Debugging connection was closed. Reconect when ready by reopening DevTools.' with button to 'Reconnect Devtools'. Then at least in theory after the button will be clicked the Suite debugger should should start to debug afterSubmit entry point but in reality it not and it continue to load record page and session is ends. It seams that it cannot connect or something like this. In the past it worked very well but now it became issue. Does anybody enfaced such a problem or has any thoughts?🙏
    n
    • 2
    • 1
  • s

    Simon

    06/19/2025, 3:11 PM
    As you all know, loading the SO take some time. I want to update a field on the Sales Order line. Is there's a way to do it without Loading the SO ? Submit field ? Likely no solution, just curious if someone has a trick I don't know Thanks
    m
    n
    • 3
    • 3
  • j

    José Gómez

    06/19/2025, 6:15 PM
    Can I trigger the creation of a JE from an Allocation Schedule using scripting? I know AS are partially scriptable, just not sure how can I trigger that
    q
    • 2
    • 2
  • c

    Craig

    06/20/2025, 10:58 AM
    I'm refactoring a script that transforms an SO to an IF in an afterSubmit() on the SO. It was throwing an error saying there was no inventory detail on the lines in the IF so the IF could not be saved. I added this code
    Copy code
    soFulfillment.getCurrentSublistSubrecord({
        sublistId: 'item',
        fieldId: 'inventorydetail',
    });
    The resulting IF now has inventory details set on each of the fulfilled lines that matches the quantitycommited from the lines on the sales order. I thought I would have to set the quantity and status but the transform appears to be pulling those through automatically after adding the above code. I appreciate getCurrentSublistRecord actually adds the sublist record if not already present, I am surprised that the above code is enough to make the IF pull through the status and quantity though.
    e
    b
    j
    • 4
    • 12
  • v

    veenasa garimella

    06/23/2025, 9:43 PM
    Encountering below error for EFT bundle: customscript_14552_entity_details_cs unable to save or edit vendor, any thoughts
    c
    • 2
    • 1
  • m

    Muhammad Kamran

    06/24/2025, 7:46 AM
    Dear Everyone I am facing a challenge from a client, the client has asked for Realtime OCR processing, there are 6 document fields and the requirement is to fetch dates, number etc from those 6 documents and populate the netsuite date and freefromtext field. The documents can be PDF, Image and Word, etc. there can be 14 page long pdf and there can be a single image. I opted document AI for OCR and I have 1 working way for Realtime but for that user will have to wait for 5 minutes and continuously press refresh button another way is to achieve it after record save, in this way i will make gcp cloud functiion as webhook but the client want it in realtime when the user creates record/edit record and want the processing time of few seconds Do you guys have any better idea or past experience, Please share it will be very helpful Thanks
    g
    m
    • 3
    • 5
  • b

    Boris

    06/24/2025, 5:39 PM
    I have created an email template for custom record. I want to send email by SuiteScript with that template. I used
    email.mergeEmail()
    but I'm not sure how to add data sources to email. in pdf template, we add data source by
    renderer.addRecord()
    and
    renderer.addCustomDataSource()
    And we can use that in PDF template by record.fieldid, Could someone help me how to do those same things in email renderer please?
  • b

    Boris

    06/24/2025, 6:02 PM
    Can we send custom json data using mergeEmail() ?
  • g

    Gojo

    06/25/2025, 6:34 AM
    Has anyone built an auto response email using suitescript?
  • c

    creece

    06/25/2025, 4:23 PM
    I'm running into a weird issue and I am not sure what's going on...maybe someone has run into this? We did a SB refresh on an account and wanted to update them to the latest version of our app in SB. In SB, the SuiteApp store is saying that they have the latest version, but if you look at the installed SuiteApps, its clearly on a prior version via the versioning number. Using our latest version, I can't deploy to SB (via SDF) due to the app being installed from the SuiteApp store in PROD and then a refresh (which makes sense) but why would the SuiteApp store think the latest is installed? Typically you could just update them via the SuiteApp store in SB but its like its confused itself on which app version its on.
    b
    • 2
    • 4
  • c

    Coleenjae Moralidad

    06/26/2025, 6:30 AM
    I would like to ask if anyone knows how to create and set up a Custom GL Impact. I'm currently encountering an error that says: "TypeError: Cannot call method 'addNewLine' of undefined." I'm not sure if the issue is with my configuration. Any help would be greatly appreciated! Below is my sample script.
    e
    k
    • 3
    • 9
  • m

    Marwan

    06/27/2025, 1:02 PM
    Hi everyone... what should I do to get a certification? I think I should get SuiteFoundation then Application Developer then Web Services Developer then SuiteCloud Developer, right?
    f
    • 2
    • 2
  • s

    shree sashti

    06/30/2025, 12:40 PM
    how to invoice sales order with lines according to the billing schedule via suitescript?. The record.transform does invoice all quantity of each lines.
    y
    • 2
    • 5
  • d

    darrenhillconsulting

    06/30/2025, 4:20 PM
    @Diego Lemos, a great channel here
    👍 1
  • a

    Armanda

    07/01/2025, 10:08 AM
    Hi Everyone, how we get Files sublist in communication subtab in transaction record , I Try getSublist to display all sublist related to trx record and i found "mediaitem" sublist, but when i use lineCount method , that counted 0, any advice ? Thanks
  • l

    Luis

    07/01/2025, 2:00 PM
    In SuiteScript, it is possible to allow downloading of a Suitelet table in XLS format in which the subtotals would show the Excel formulas instead of hardcoded values? For example, =SUM(A2:A5). Note: The no. of rows to be subtotaled may vary. There are multiple subtotals in a column. And if possible, is it super complicated? Any guidance? Thanks.
    a
    y
    • 3
    • 6
  • s

    Stefan Holodnick

    07/02/2025, 2:41 PM
    Does anyone have some suggestions for troubleshooting the pdf rendering engine when trying to render multiple PDFs together. This is the error I'm getting: {"type":"error.SuiteScriptError","name":"USER_ERROR","message":"Error Parsing XML: //xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7363&c=xxxxxxxxxx&h=-EbGbJlGJ346A2DNt6C7S31ELWc8VwDg-5UP-CJb4GQr1xTy&_xt=.pdf","id":"","stack":["Error\n at combinePdfsWithXml (/SuiteScripts/rl-packing-slip-generator.js29742)\n at Object.post (/SuiteScripts/rl-packing-slip-generator.js4433)"],"cause":{"type":"internal error","code":"USER_ERROR","details":"Error Parsing XML: //xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7363&c=xxxxxxxxxx&h=-EbGbJlGJ346A2DNt6C7S31ELWc8VwDg-5UP-CJb4GQr1xTy&_xt=.pdf","userEvent":null,"stackTrace":["Error\n at combinePdfsWithXml (/SuiteScripts/rl-packing-slip-generator.js29742)\n at Object.post (/SuiteScripts/rl-packing-slip-generator.js4433)"],"notifyOff":false},"notifyOff":false,"userFacing":true} This is what the template XML looks like that it is trying to render:
    Copy code
    <?xml version="1.0"?>
    <!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
    <pdfset>
      <pdf src="<https://xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7901&c=xxxxxxxxxx&h=_ekndKfcsGcfW9OA3F270Vh_ZprbeZ8iUBD6ZovktckNAN8c&_xt=.pdf>" />
      <pdf src="<https://xxxxxxxxxx.app.netsuite.com/core/media/media.nl?id=7363&c=xxxxxxxxxx&h=-EbGbJlGJ346A2DNt6C7S31ELWc8VwDg-5UP-CJb4GQr1xTy&_xt=.pdf>" />
    </pdfset>
    I have generated the files as available without login. Any suggestions on what is wrong here?
    a
    • 2
    • 5
  • k

    Kristopher Wood

    07/02/2025, 7:45 PM
    I'm building a customer/vendor facing portal app and need a good UI. Does anyone have a preferred UI library for use with SuiteScript?
    m
    m
    • 3
    • 3
  • s

    shree sashti

    07/03/2025, 4:49 AM
    i have a predefined email template on NS . I need to get that template and change some values dynamically and send it as a mail . How in suitescript do i get that template and its content in my code ?
    m
    • 2
    • 2
  • f

    Felix Divall

    07/03/2025, 7:39 AM
    I have a client with a pretty old approvals customization that has stopped working since installing OneWorld. How does OneWorld affect the environment? Do I need to make any updates to reflect OneWorld? It's a nasty issue of both scripts and workflows, where there currently is a workflow that doesn't reach any state other than 0
    a
    k
    • 3
    • 4
  • i

    Isaac M

    07/03/2025, 4:45 PM
    It's crazy how setting a field to VIEW access for certain roles no longer allows scripts to VIEW that field. Make it make sense...
    🫠 2
  • e

    Edgar Valdes

    07/03/2025, 8:43 PM
    Does the script run as a certain rol also?
    ☝️ 2
  • j

    Jeff Subat

    07/05/2025, 4:31 PM
    I'd like to print paychecks from SuiteScript using the standard PDF template. To do that I believe I need to specify the transaction form id. The paycheck transaction form, though, isn't listed in the Custom Transaction Forms page. Wondering if it's possible to print paychecks by specifying the transaction form id and, if so, how to identify the paycheck form's internal id?