QA Tips – Entering values to disabled fields

We can add or update the values in disabled fields by console.

Steps:

  1. Edit the current record.
  2. Right click -> Select Inspect
  3. Select console.
  4. Click on clear icon.
  5. Type require([‘N/currentRecord’], currentRecord=>window.currentRecord=currentRecord); then press enter
  6. Type let recordObj = currentRecord.get(); then press enter
  7. If transaction line field need to be updated, select the corresponding field, and then type in console:
    recordObj.setCurrentSublistValue({sublistId: ‘x’, fieldId: ‘y’, value:z}) Add right values in place of , y and z.
    For eg., updating item line field amount:
    recordObj.setCurrentSublistValue({sublistId: ‘item’, fieldId: ‘amount’, value:7930})
  8. If body level field need to be updated,
    recordObj.setValue({ fieldId: ‘x’, value:y})
    For eg., updating memo
    recordObj.setValue({ fieldId: ‘memo’, value:test})
  9. Save the record

Leave a comment

Your email address will not be published. Required fields are marked *