im must be doing something wrong im trying to save...
# suitescript
s
im must be doing something wrong im trying to save a URL to custom body filed , type is hyperlink , works in ui
Copy code
record.submitFields({
      type: bill.type,
      id: bill.id,
      values: {
        custbody57: `<https://www.freecodecamp.org/>`,
        memo: "test"
      },
      ignoreMandatoryFields: true,
    });
b
Hi Sim, i did the same (saving a url into a custom field), but i did that differently and it worked for me:
Copy code
var objRecord = record.load({
         type: record.Type.YOUR_TYPE,
         id: your_record_id,
         isDynamic: true
      });

      objRecord.setValue({
        fieldId: 'custentity_yourcustomfield_name',
        value: your_url
      });

      objRecord.save({
        ignoreMandatoryFields: true
      });
j
What’s the error you get?
you should remove the comma after the true in ignoreMandatoryFields
and PLEASE change your field name so it’s not custbody57 🙂
s
all good i wasn't saving the bill
h
@Sim Greenbaum Make your custom field type correct. options: { enableSourcing: true, ignoreMandatoryFields: true }