Hi, The logs are not what i expected. No values I ...
# suitescript
r
Hi, The logs are not what i expected. No values I requested in the else are showing in log. I have tried to change the code by declaring my 'recid' out of the if{ }…. anyway when I submit the button these are suppose log are that's not happening i do not know why
b
you will want to explain yourself better
i cant tell if you are describing an error thrown in your else statement
or that your logs arent what you expect them to be
r
Hi, The logs are not what i expected. No values i reqested in the else are showing in log. i have tried to change the code by declaring my recid out of the if{ }.... anyway when i submit the button these are suppose log are thats not hapening i do not know why
i am trying this example so for much time now.. i do not understand... how am i suppose to get the current record id... i got this from client script succesfully in GET but in POST it is just not logging
My statement is: On the customer record create a button in view or edit which on-click will direct u to suitelet and has the information directly from the customer ( the name and the sales rep ) (which i got ) and upon submission (when i click 'ok' on suitelet for submission) it should create a task record with the name of the customer and since no recid ..Nothing
b
there is a difference between no logs and empty logs
no logs either means that your log level is not at the correct level
or that the code for the log was not called, which in this case would probably be because an error was thrown
empty logs means that there are no details in the log, but there is a log record
empty details in the log would mean that whatever you are trying to log has no value, or more unusually, a value that doesnt stringify
For your particular code, you are using ServerRequest.parameters incorrectly, it does not have the same behavior between GET and POST
r
yeah its empty logs to be specific.. and if i want recid .. i should use context.request.body.recid.. right? and thats not working too.. how do i retrieve the value from body
b
Go through the 8 members of a ServerRequest until you find what has your data