This topic contains 1 reply, has 0 voices, and was last updated by latchadev 6 years, 11 months ago.

  • Author
    Posts
  • #18130

    latchadev

    I have the following code, which returns the field that triggers a changeField event. It works on a Job record type, but it doesn’t work on a TimeSheet type. I am simply trying to show/hide a field based on the Customer a user chooses when adding time to a timesheet.

    EXAMPLE:

    Code:
    define([‘N/currentRecord’], function () {

    function fieldChanged(context) {
    //context.fieldId returns the proper id in all cases
    //getField() only works on the Job record type, returns null on Timesheet grid

    var f = context.currentRecord.getField({fieldId: context.fieldId});
    f.isDisplay = false;
    }

    return {
    fieldChanged: fieldChanged
    }
    }
    );
    Can anyone point me in the right direction? Is there another way I am supposed to get the field and its value for a Timesheet grid? getField is supposed to work but it doesn’t. If I pass it any field Id in the grid it returns null.
    This is a cached copy. Click here to see the original post.

  • #18131

    latchadev

    12345

You must be logged in to reply to this topic.