2

I have some custom fields in my 1GP managed package that I need to change in various ways as part of a patch release. Can I:

  1. Change the number of decimal places in a numeric field?
  2. Change the length of a text field?
  3. Change the required status for a field?
  4. Change the delete constraint for a field?

As usual, there is very little information available in the Salesforce documentation, on the forums (including the partner forums) or via internet search, around what you can and cannot do in a patch release.

1 Answer 1

3

The following answers are derived from git history, for our AppExchange listed 1GP managed package, covering various patch changes over many years.

Can I change the number of decimal places in a numeric field?

Yes, this is a simple change to the scale of the field.

Can I change the length of a text field?

Yes, though care should be taken when reducing the length since data loss can occur.

Can I change the required status for a field?

Yes, this is possible to do for changing from both true to false and false to true. The latter takes a bit more effort since you must ensure that all records have a value for the given field before installing the upgrade, otherwise you get an error while installing the patch.

Can I change the delete constraint for a field?

Yes, the delete constraint can be changed from SetNull to Restrict or vice versa without any other actions required.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .