Hey everyone. Weird issue I've encountered today...
inventoryAdjustmentId is '59424'
typeof inventoryAdjustmentId is string (I've also casted it to a Number, but still the same issue):
//This code errors (SSS_MISSING_REQD_ARGUMENT) "Missing a required argument: id":
record.submitFields({
type: record.Type.ASSEMBLY_BUILD
, id: assemblyBuildId
, values: {
custbody_cat_swp_relatedadjustment: inventoryAdjustmentId
}
});
//But this works:
var assemblyBuild = record.load({
type: record.Type.ASSEMBLY_BUILD
, id: assemblyBuildId
});
assemblyBuild.setValue({
fieldId: 'custbody_cat_swp_relatedadjustment'
, value: inventoryAdjustmentId
});
assemblyBuild.save();