Hi, I have a custom sublist on a custom record. Th...
# suitescript
w
Hi, I have a custom sublist on a custom record. The sublist has a line-field, Account Type, of type list/record (custom record) that is sourced from the parent. I works fine. The sublist has another line-field, Account, of the type list/record (also custom record) that should be filtered based on the line-field Account Type. This works for: • existing lines • new lines when you press ok on an existing line It doesn't work for: • initial new line on page init • when pressing cancel on an existing line I have tried to set the Account Type with a script on lineInit to get the sourcing to initialize. This works, but it will replace the current value in Account. If I put ignoreFieldChange = true, then the filtering will not occur. Maybe I could store all the values for the line and then re-set them with ignoreField-change afterwards, but that seems inefficient Any tips?
Nevermind, it seems to work with
Copy code
ignoreFieldChange: false
forceSyncSourcing: true