My Stuff

User_KC8S1 Red Ribbon

Comments

  • There are several different ways to handle this and it depends on your specific requirements, percentage of reversals, transaction volume and ease of editing the "queued email order" [LIST=1] [*]Create a script that will handle the emailing, schedule it using nlapiScheduleScript() (I think thats what it's called) and pass…
  • Is there an API that sets the display type of UI objects like field, button or tab? For example, during page initialization, I want to programmatically set a field from "Normal" display type to "Disable" or "Hidden" given a certain condition, like if field A is equal to "apple", field b will be rendered in view or disable…
  • Try throwing an error from the beforeSubmit script. Thanks, Yang Yang, thanks for the suggestion but no dice! Here is my code (over-engineered now that it appears to not be an option) var ERR_CODE = { NO_ERR_ABORT_SUBMIT : { Code:'NO_ERROR_ABOUT_SUBMIT', Msg:'Intentionaly thrown exception to abort record submit'}, }…
  • 1) As Elham said you can only debug scripts with status set to "Testing". This status means that you (the script owner/author) are the only user for which the script will execute. I didn't know this? Does the status trump the audience selections?
  • There isn't a way to search the file cabinet by name in SuiteScript. Thanks, Yang Is there a way to search for files at all? Are the "file" records supported in SuiteScript? I'm not seeing anything in the help....
  • [untested code] function OnSave() { var primary = nlapiGetFieldValue('idOfThePrimaryField'); if(primary == 'F' || primary == null || primary == 'undefined') { alert('check the primary!!!!!!!!!!!!!!!!!'); return false; } } Now, I have no idea what the primary field is, so I don't know the field name but the concept is what…
  • I've narrowed the problem down. First let me explain what I'm doing: using Web Services I'm saving a message record which I'm using as a proxy to attach a file cabinet asset to a record. I include a "command statement" in the message body like so: ||AttachFileToRecord({0},{1}, {2})|| Where param: 0 = file cabinet id 1 =…
  • Alright, looks like the weird problems I was having was related to the NS outtage yesterday. Now that things are back online and I can use the debugger, etc. I'm having a new problem: nlapiAttachRecord('file', '123', 'customer', '4567'); Note I also tried 'entity' as the target record Id. The above code is throwing an…
  • Because this record type (file) is not yet supported, the only field on the file search join that you can rely on working is the internalid join field. I happen to also know that name and description should also work. Thanks, Yang I had to do some trial and error to figure out what the field ids were for attachments. For…
  • Steve - Can you post your code? Attaching a file to a customer is supported, so I'm not sure why you're getting an INVALID_RECORD_TYPE error. Thanks, Kate Kate, this is a weird one. I have no idea what's going on. I will post full details in a subsequent message.
  • Only via joined search (join ID=file) on a scriptable record type that can be linked to documents (i.e. customer, salesorder). Thanks, Yang OK, so given a customer record we could get the files attached to that record? Any reference for the field names of the file records?
  • This is something we could definitely use as we collect SSN's from all our clients for loan approvals, however I do not know how to implement this code. Any additional advice on how to deploy this would be greatly appreciated. David Cline Rehab Funding As far as scripting goes it's pretty easy. You would want to do the…
  • Hi Tim, I'll go over the use case real briefly. We have a hundreds (soon to be thousands) of incoming faxes a day. These are responses to forms that we fax out for signatures. Our data entry application captures the field data and the tif images from the fax and stores that data in NetSuite (web services). Server side…
  • Correct. We want the button handler to run client-side code that fetches the value from the suitelet form's fields. Are you saying we should define a function in the suitelet's client-side script, and make that script the button handler? No, I'm not suggesting anything at this point, just making sure I have the facts…
  • BTW, thanks for this info. Kate?..... The docs are seriously lacking here. There is no mention of any of this "moving fields around" functionality. The reason I found this thread is that I just checked the help and "kinda remembered" what yang said awhile ago but wasn't sure. I then came here and searched to get the…
  • Note: The Guard class is a utility class that I have written, I think if you search the forums for Guard.NotNullOrEmpty you will find the post where I submitted the source.
  • I have written a script which eventually updates the original transaction. The issue I am having is that it returns a memorised transaction Error code: Type: User Event Function: send_message Error: ATTEMPTING_TO_ACCESS_MEMORIZED_TRANSACTION_AS_A_NONMEMORIZED_TRANSACTION Attempting to access memorized transaction as a…
  • I was on PTO :) nlobjForm.insertField( ... ) removes a field from it's current position on the form and inserts it before another field specified by the 2nd argument. Thanks, Yang If I wanted to create a new subtab, move main fields to the subtab then I would need to create a dummy field on the tab first, then remove after…
  • I presume you are trying to move the fields around in a beforeLoad script. Did you try using nlobjForm.insertField(...)? Thanks, Yang Hi Yang! Where ya been?? Yes, before load script. I didin't think to try inserting as I don't want to create a new field, but move an existing one. I'd rather not hide all the fields, then…
  • OK, so you are adding a client handler for the button onClick event, correct? So the problem is that in some client events you can fetch the value, but in the handler supplied to addButton() it's returning null? All code (at this point) is running client side?
  • Does nlapiGetFieldValue() return data when called from other client events, say... onFieldChange?
  • My path is "C:\Program Files\eclipse\eclipse.exe"
  • Is it just me or does that make the whole idea of custom forms down the unused box? No, not at all. I didn't include the full details of my use case. I have a single table (record) that has many different display and entry requirements based on it's "type" (just like vendor, customer, contact are all the same record) So in…
  • sklett, Thanks for the info .. btw how long have you been writing javascript? I have a very solid background in html, css, and php; currently in the process of learning javascript (javascript for dummies) and reading through all the help files. So far I have installed Eclipse and the plug-in, you could say I am on the…
  • ...last created record in case of customers... I don't understand. Do you mean the last created message attached to a case for a specific customer? If so, create a saved search, then execute it using nlapiSearchRecord() (check docs for where to specify the search ID)
  • When I run into these issues I will log the event type (type parameter of a UE event) to the execution log. Blank out the event type on the deployment (it's not required) and then respond to an emaila nd look at your scripts log. If there is anything there you will know what even to use, if not... well then incoming emails…
  • Couple bits of info: 1) We are working on a plugin for eclipse that will allow directly uploading of script files into the file cabinet. Should be available later this year. 2) The next version of Javascript closes the gaps with languages such as Java and C#. It has full OOP and much more. It will also provide more support…
  • Hey Kate, There is a case opened up for this guy. Case #738342 Update : Debugger is not picking up on suitelet? From the comments in the case it looks like I just might have found a problem...
  • I don't use Jobs, so I'm not sure what "Media Entries" are. Is this a custom tab? Are these child records? Sounds like Media Entries is a sublist... More info please (at least for me to be able to try and help...)
  • Also at the same time any advice regarding SuiteScript development would be appreciated. Here are a couple things that I think work well. My project is pretty large (over 15k lines of script right now) so some of this may be overkill when maintainability isn't a huge concern. [LIST] [*]Store Ids as constants [*]Assert…