I have a suitelet with 3 buttons on it and 1 text ...
# suitescript
e
I have a suitelet with 3 buttons on it and 1 text field to hold my "action". When I click one of the buttons, I want my action to field to be updated to a certain string (that will be read upon submitting the form). When I click the button, I get an error in the console of "currentRecord.setValue is not a function". Is there a way to have a button set a field on a suitelet? Suitelet script:
_form_.addButton({
id: 'custpage_btn_pick_order',
label: 'Pick Order',
functionName: 'setActionAndSubmit("pickOrder");'
});
Linked Client Script:
define(['N/currentRecord'], _function_ (_currentRecord_) {
_function_ setActionAndSubmit(_action_) {
console.log('set action as ' + action);
_currentRecord_.setValue({
fieldId: 'custpage_information_action',
value: action
});
//submitForm();
}
...
This function is being returned along with others