```const fulfillment = record.load({ type: rec...
# suitescript
c
Copy code
const fulfillment = record.load({
    type: record.Type.ITEM_FULFILLMENT,
    id: fulfillmentId,
    isDynamic: true,
});

const shippingSubrecord = fulfillment.getSubrecord({
    fieldId: 'shippingaddress',
});

const countryCode = 'DE';

shippingSubrecord.setValue({
    fieldId: 'country',
    value: countryCode,
});

fulfillment.save();
Is this not enough to save a new shipping address on a fulfillment? I've added extra code to set other fields (country being the only mandatory one) - the IF saves but the new/custom address is not saved on the iF. This is an afterSubmit and a shipping address is already present on the record.
For those that stumble across this, I have found the solution. You must first clear the value of the shippingaddress field like so:
Copy code
fulfillment.setValue({
    fieldId: 'shipaddresslist',
    value: null,
});
👍 1
👀 1