1

While cloning the Opportunity, is it possible to copy only certain field values. I want some fields to be empty whichmeans it should not contain the existing opportunity value.

Thanks

1

The simplest solution is to use a button as described in the accepted answer to this post: Provide standard clone button functionality to a button on vf page where the page opens in edit mode and when saved, becomes a cloned record. One can clear the fields that aren't needed before saving the cloned record. BTW, the latter can now be done using an action method as well instead of a button (see the newest answer to that question for details).

| improve this answer | |
1

This can be done simply by first querying the record you wish to clone, and only querying for the fields you wish to be filled. Any field which is not included in the query will not be filled out on the clone, with the obvious exception of fields like CreatedDate which are set by the system.

| improve this answer | |
0

Try something like my previous solution here. This can be customized to pull in whatever you need only in your clone - in a couple lines of code and still set up for cloning using the $Action command

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.