Scenario
User encounters the error "You can only enter line level landed cost when the landed cost per line option is selected" when saving an Item Receipt record via SuiteScript.
Solution
One possible cause of encountering the error "You can only enter line level landed cost when the landed cost per line option is selected." when saving an Item Receipt record via SuiteScript is when the script sets line-level value on Landed Cost column field without enabling the record-level Landed Cost per Line option.
To prevent this error, the Landed Cost per Line option must also be enabled in the script before setting a line-level value on Landed Cost column field.