:wave: Do you get an error after updating NS messa...
# suitescript
m
šŸ‘‹ Do you get an error after updating NS message: "Please enter value(s) for: Department" ?
c
I use to have it when there is a missing subsidiary
m
I get this error in the journal lines
c
Does it occur when you are saving your JE? Is your field department on lines mandatory? Do you have any mandatory fields which could be empty (a log.debug on it before saving your record could help to be sure of that)? Have you tried to update your JE manually to see if you have it in UI also?
m
do we have the option to ignore the required field in the lines?
c
They are required for a reason
m
yes of c
c
Copy code
var recordId = objRecord.save({
    enableSourcing: true,
    ignoreMandatoryFields: true
});
m
since yesterday, I began to receive such an error mine, there are no changes on the form.
it's work since yesterday
Copy code
var recordId = objRecord.save();
@Caroline thk
it looks like the client script filled in this field by the insertion event from the script, maybe I need to explicitly specify the event for the line fields? like :
Copy code
objRecord.setCurrentSublistValue({
    sublistId: 'item',
    fieldId: 'item',
    value: true,
    ignoreFieldChange: true,
    forceSyncSourcing: true
});
c
Not sure to understand. Here the options are not related to an event but a behavior: do you want to trigger the changes related to the update made on this field like it is automatically done by the system in UI? do you want to source synchronously (optimization)? So these options are not triggered by an event but impact the behavior of your actions.
m
Make Locations/Departments/Classes Mandatory on Deposit Applications Navigate to Setup >*Accounting*> Accounting Preferences > General tab > Classification section > Set the following preferences to True: • Make Departments Mandatory • Make Classes Mandatory • Make Locations Mandatory -- my decision
šŸ‘ 1