I'm trying to update fields on GL Impact Sublist of a Item Fullfillment record. I do not know which sublist ID to assign it. To then loop through each line and update a field on the sublist record.
Can anyone assist on what I need to do in Suitescript
Although @b-assem is correct in that you cannot directly affect the GL Impact of a transaction you can do this after a fashion using the 'Custom GL Lines Plug-in'. Search for that in the Netsuite help for more details.
The plugin calls a script every time the GL impact of a transaction is updated so it should be quick or it could have a major impact on your account's performance.
basically it allows you to reverse some or all of the GL impacts of your transaction and to add new GL Lines to balance those reversals.
You could also do much the same by scripting a JE in an Item Fulfillment After Submit Event script but that is a much more involved process. You'd do that by getting the Item Fulfillment's GL Impact from a search and create or update the JE in response. You'd need to add a linking field to the JE so you can find the JE created for a particular fulfillment and keep it up-to-date or delete it if the Item fulfillment gets deleted.
You can not edit GL Impact lines using script or even using the UI. The GL Impact is calculated by Netsuite based on the Transaction data (in your case, based on the Item Fulfillment record data), like the selected Accounts (or the concerned Items accounts), the Transaction Status or Approval Status...
And to answer exactly your question: the GL Impact is not a sublist that you can loop through using Scripting the way you do with other sublists like Items and Expenses.
Netsuite doesn't provide a Sublist ID for the GL Impact lines.
This is said, this help article provide a "workaround" that can be useful for your case.