Hey all -
Tearing my hair out a bit this morning (what's left anyway) over this issue.
I have a simple Suitelet that I am trying to create with an nlobjForm object. It is called via a client script which is called via a button click (custom button added via UE script). Pretty typical workflow, and one I have done numerous times.
Here is the client script:
function markPOShipped(id) { // redirect to suitelet var url = nlapiResolveURL('SUITELET', 'customscript_kw_markposhippedtrack', 'customdeploy_kw_markposhippedtrack'); url += '&id=' + id; document.location = url; } ...and here is the Suitelet script function KW_markPOShippedAddTracking(request, response){ if (request.getMethod() == 'GET') { var form = nlapiCreateForm('Mark PO Shipped and Add Tracking'); response.writePage(form); } else { } } I've simplified this, obviously, to try and isolate the problem. However, when this runs, I do not see a form at all, but rather the following: [TABLE="border: 0, cellpadding: 5, cellspacing: 0"] [TR] [TD="class: textboldnolink"]Notice |
[TABLE="border: 0, cellpadding: 0, cellspacing: 0"] [TR] [TD="class: text"] |
| There are no records of this type. |
[/TD] [/TR] [/TABLE] [/TD] [/TR] [/TABLE] When I change the code to the following: function KW_markPOShippedAddTracking(request, response){ if (request.getMethod() == 'GET') { var form = nlapiCreateForm('Mark PO Shipped and Add Tracking'); response.write(form); } else { } } ...the output simply says "nlobjForm". So, my guess is that it's the "writePage" function, yet I cannot determine what I am doing wrong. Like I said, I've done this exact pattern multiple times before and had no issue. At first I thought the form required some field elements in order to render properly - so I tried adding those, and got the same error. No matter what I do, I seem to get this problem.Does anybody know what might be causing this? It's driving me crazy!