function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MissyLewMissyLew 

Clone button with override on Auto-Number field

I am working on a project in the NPSP. I'm very new to coding so am hoping to get some guidance on how to go about doing a couple of things on the Donation (Opportunity) object:

 

  1. There are two lookup fields - one to a custom object called "Funds" and one to Campaigns. I need to enter a Fund via lookup, then have the Campaign field default to the "Default Campaign" value from that Fund record but be overrideable (so can't use formula).
  2. There is an auto-number field on the Donation. There are situations where I would need to clone the Donation record and override the auto-number to populate that field on the clones with the original Donation record rather than a new auto-number.

Any suggestions/help would be greatly appreciated!!

 

Missy

V1nitV1nit

An auto-number is a system generated unique id. You cannot override this.

Instead you can create a custom id field and then copy accross the id. Dont know if that serves your purpose.