My Stuff
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Comments
-
The only way around this would be to use a generic customer on the transaction (before saved). You could stuff the "lead" record on a custom field of the transaction so you don't loose it. I wouldn't hold your breath for that enhancement.
-
What type of script did you create? Is this a client script or user event? Sorry, just read your title of the post. The reason for asking was the function name you gave suggested it was a client script.
-
You should also never use text when looking at values. You should use the internalid. This will prevent mistakes from happening.
-
SuiteScript 2.x module called N/ui/message module https://netsuite.custhelp.com/app/answers/detail/a_id/49316
-
Not with the NetSuite API and not without posting back to the suitelet or loading all the data to the page. With the NetSuite API you can add the filter fields and post back to the suitelet with the submit button. On page reload your script can use the field data to do the filtering. Outside the box, you can use 3rd party…
-
What type of script is it and what record (if any) are you attaching it to?
-
NetSuite built-in XPath functions
-
I just noticed that your code is trying to use setTransaction Try changing it to emailMerger.setEntity(<entityType>, <entityId>);
-
In your previous posts you said you tried a suitelet and restlet. However, you're using "recordid" for the entity. That doesn't make sense to me because those script types are not on the customer record. I'm thinking that maybe the error is with the recordid you're trying to use. My suggestion would be to put your code in…
-
nlapiLookupField will return an ID not a text unless you use the last parameter and set it to true.
-
I would highly suggest getting used to using the filter expressions. It's just a set of arrays. I think what you're looking for is something like this: [ ['contact.internalid','is',input.id], 'and', [ ['firstname','contains',input.searchValue], 'or', [F2], 'or', [F3], 'or', [F4] ], 'and',…
-
Looks like valid JSON to me. I just noticed in your original code you have var responseBody = response.body; Shouldn't that be var responseBody = response.body(); If that's not the issue my next steps would be 1) try to use the responseBody without parsing it. 2) a deeper debug would be to write the response body to a…
-
Can you log just the raw response? Sometimes NS puts unnecessary tags at the end of the response. Also, are you specifying in your header that it's application/json content type?
-
Try using this: https://chrome.google.com/webstore/detail/netsuite-search-export/gglbgdfbkaelbjpjkiepdmfaihdokglp
-
Use the orderstatus field. Here are the codes. (A-H) Status in UIStatus CodeOrder:Pending ApprovalSalesOrd:A Order:Pending FulfillmentSalesOrd:B Order:CancelledSalesOrd:C Order:Partially FulfilledSalesOrd:D Order:Pending Billing/Partially FulfilledSalesOrd:E Order:Pending BillingSalesOrd:F Order:BilledSalesOrd:G…
-
Hmmm, I'm not sure. That seems weird.
-
How did you create your group? Is this an external MS exchange group? Or are you wanting to use the NetSuite groups? If you use a NetStuite group, when you create the group you can assign an email address to the group. I believe you can then just use that email to send to everyone.
-
How did you get "3" for your ID (just trying to cover everyting)? The internalid can be found in the URL when you edit the email template. It will be something like this: /app/crm/common/merge/emailtemplate.nl?id=19&e=T If that is the line you're failing on it has to do with either the record type not supported (customer…
-
var emailMerger = nlapiCreateEmailMerger('3'); // Initiate Email Merger - failing on this line If you're failing on the line that creates the email merger then I would check your template. Make sure it's a scriptable template.
-
What record type are you attaching this script to? Is it a transaction or something else?
-
erictgrubaugh is a great resource for training if you're interested in learning from someone that really knows what they're doing.
-
I've compiled the following if anyone is interested in using it. // by David Smith @ SWK Technologies function getRecordIdByTypeid(id){ var types = { "Account": { "typeId": -112, "id": "account", "category": "List" }, "Accounting Period": { "typeId": -105, "id": "accountingperiod", "category": "List" }, "Bin": { "typeId":…
-
Check to make sure your character set is correctly identified. Here is the document for reference. http://bfo.com/products/report/docs/userguide.pdf
-
var contactSearch = nlapiSearchRecord("contact",null, [ ["opportunity.status","anyof","C"], // Closed Won "AND", ["opportunity.entitystatus","anyof","13","8","11"], // op status any of Closed Won, In Discussion, In Negotiation "AND", ["internalid","anyof","1011"] // contact internalid ], [ new…
-
I don't think you want to try and put your script into the xml for the PDF. A PDF document is not able to modify itself like this. There are quite a few things here I would change but basically you will want your 'xml' to be the complete before rendering it. So use your 'lines' loop to create the table data as a string and…
-
For client scripts I like to use the console for debugging rather than constantly switching tabs to see the script logs. You can also perform most of you code directly in the console to see the values.
-
/** * Global Variable Declaration */ var recipient = ""; var cc = []; var practices = nlapiGetFieldTexts('custbody50') || []; function cs_emailPractice(recipient){ console.log("sending email to",recipient); // code to send email.... } function cs_RequestSOW(){ console.log("Request SOW Button Pressed");…
-
I'm guessing the Advanced PDF is your best bet.
-
Have you looked at the shipmethod field and sourcing? In the UI you can use nlapiSetFieldValue('shipcarrier','nonups');
-
Well alright then... I'll add one more thing to the thread. I would never use text to determine a value. Since this is coming from a multiselect list the text values can easily change. "Bid Data" might become "Big Bad Data" and never fire off that email.