Discussions
How to reference the expensereport object from an expense object
Hello. I’ve been working with NetSuite now for a bit more than two years. Though I have experience in other languages, JavaScript is new to me. After taking the NetSuite course for SuiteScript, I realize the power and sometimes danger in not fully understanding the scope of deploying a SuiteScript.
My question revolves around accessing the record’s data value (parent?) while working with its detail. I have an expense row’s isbillable field value is dependent upon the custom field, Expense Type, retained in the associated expensereport. I would prefer not to wait for the save of expense report to loop through the expense rows to set/test the isbillable value. How does one reference the expensereport object when in the expense row object? And where would be the best placement of the validation/update within a client script?