My Stuff
Comments
-
Olivier, Hope you can give me some tips on this one. I do not think that Online Form custom script can perform nlapiSearchRecord(), can you confirm with me on this one? Meaning, I can not simply insert nlapiSearchRecord() into an online form custom code file. Then, can the online form perform any searching on the customer…
-
Hi all, On the online form custom code, I tried these codes but none of them worked, why?? ------------------------------------- function toSuitelet() { nlapiSetRedirectURL('SUITELET', '113', '1'); return true; } -------------------------------------- function toSuitelet() { nlapiSetRedirect('SUITELET', '113', '1'); return…
-
Hi Olivier & NetSuite, I am having a problem with scripting a search, can someone help me out a bit? Thanks How do I include a transaction field filter into a customer search? For example, the following does not work. ---------------------------------------- filterSalesOrder[0] = new…
-
Olivier, Thanks for your tip. Your answer did provide me a basic idea. My process is, I will provide a pre-order online form to my existing customers for filling up their purchases, then the new sales order will be created upon the submit of the online form. Can you let me know the basic command that is used to create a…
-
Never mind the problem is solved now. Thanks
-
NetSuite, Under the Custom Code of any forms/online forms/custom records, the scripts are always underlined for the users to download. How can I prevent any other users to download the script files? Even though I restrict the groups in the "File Cabinet" and set the folders to private, can any other users still download…
-
Yang, Thanks. How come I submit an enhancement for voting? Frank
-
Hi Yang, Thanks for the tip. Can you take a look at the following function triggered upon SAVE of a custom record? I am very sure the record I SAVE has an internal ID, but the internalid value returned by the log is "NULL" function writeExternalID() { var regHistoryInternalID = nlapiGetFieldValue('internalid');…
-
Yang & MGoodMan, For the USER EVENT script to write in the external value, I think I have to include nlapiSubmitRecord(true) right after the following two lines, correct? ------------------- nlapiSetFieldValue('externalid', toWriteExternalID); nlapiLogExecution("debug", "New External ID", "External ID Assigned: " +…
-
Hi MgoodMan & Yang, Can you guys take a look at the following? These two functions are the samples I use as the custom code attached to the custom record form. pageInit() is for upon the EDIT and submit() is for upon the SAVE. Anything are wrong with the codes? function pageInit() { var thisExternalID =…
-
Hi MgoodMan & Yang, Can you guys take a look at the following? These two functions are the samples I use as the custom code attached to the custom record form. pageInit() is for upon the EDIT and submit() is for upon the SAVE. Anything are wrong with the codes? function pageInit() { var thisExternalID =…
-
Should I include nlapiSubmitRecord() or nlapiSubmitField() ??
-
Hi Yang, Thanks for the tip. Can you take a look at the following function triggered upon SAVE of a custom record? I am very sure the record I SAVE has an internal ID, but the internalid value returned by the log is "NULL" function writeExternalID() { var regHistoryInternalID = nlapiGetFieldValue('internalid');…
-
mGoodMan & Yang, Can you guys try out the two functions I mentioned earlier... ?? When I tried those two functions, it looks like it works from the values returned by alert() However, when I click SAVE, the value does not write into ExternalID. I really need to write values into this field by client script so there will…
-
Thanks all, the problem is solved. Everything works fine now.
-
Yang & MGoodMan, Sorry for bringing this issue up again. Actually it did not work, for some reasons, it just could not write in externalid value by using USER EVENT script. I wrote the following lines in the code, but nlapiSetFieldValue('externalid', brah) just could not work, nlapiLogExecution() works fine though.…
-
Thanks. It works now..
-
Yang, Thanks. In such case, I have to use an USER EVENT script to write in the externalID. How can I pass the parameters from the custom record to the user event script? For example, I want to pass the following parameters on the custom record(ID#001) to the user event script, so the script can write the externalID into…
-
Hi anyone & NetSuite, I just need some tips on this issue: On the HTML template of a custom online form, I have include some non-NetSuite fields (HTML input controls). Then, I want a javascript to detect the fields upon field changed. I have tried to use if(name == xxx ) in the custom code file to detect the non-NetSuite…
-
Yang, Thank you for your advice. But can you double check for me to use the line you wrote me? I thought I could use the line too but it did not really work out for me. nlapiGetFieldValue() is ok to get externalID but nlapiSetFieldValue() failed to write in. Thanks
-
Thank you all, the script is working FINE with lead, prospect, and customer now !!
-
Yang, Are you sure if I apply to customer only, and the user event script will be triggered on the Prospect too?? Do you think I can use the script to check on the TYPE of the customer and then somehow control the display of the error message? For example: function addressSWAP(type) {
-
The following is the sample of the user event script triggered on the EDIT of the prospect and customer record: --------------------------------------- function addressSWAP() { var theCustomer = nlapiLoadRecord(nlapiGetRecordType(),nlapiGetRecordId()); var customerID = theCustomer.getFieldValue('entityid'); var firstName =…
-
Hi all, Actually I have a problem now, after I modify the code you mentioned. The script somehow can not be triggered by "Apply to" customer. But it is triggered by Lead and Prospect... I do not understand why...
-
Yang, I am confused, I need some examples. Are you saying I need to edit this line to accept the change of the customer record type? var theCustomer = nlapiLoadRecord(nlapiGetRecordType(),nlapiGetRecor dId());
-
Yang, I am confused, I need some examples. Are you saying I need to edit this line to accept the change of the customer record type? var theCustomer = nlapiLoadRecord(nlapiGetRecordType(),nlapiGetRecor dId());
-
Yang, Thanks. But are there any other ways I can get the text of the country dropdown? I want to get the text on the "country" dropdown in the addressbook, how can I do it through the form custom code?
-
Problem is solved now, no need of any switch statements or codes... All you need is to add a new form field to the custom record for storing the abbreviated country code.
-
Yang, for example: In the addressbook, the value in the dropdown for United State is "US" But through the custom code of FORM, how can I get its text "United State of America" ??
-
var adminEmail[0] = 'someone@someone.com'; var emailTitle = 'NetSuite Script Execution Report'; Line#27 is either one of the above. I do not see anything wrong but the script would not work unless I took the whole portion out of the script...