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
RadagastRadagast 

One-Time "Lookup"

Years ago, FileMaker Pro had a field type called "Lookup" which essentially copied and pasted into itself the current value of a field in a related object. I am trying to do the same thing in SFDC.
 
I have a custom object called "VF_Invoice" which is the child to Opportunity. I want to click the "New" button above the "VF Invoice" related list and create a record that pre-populates fields based upon the current values of Opportunity fields, but I don't want those field values to change if their counterparts on the Opportunity record change. Ideally, these pre-populated VF Invoice fields could then be edited manually by the user if needed.
 
Is this possible? I am very new to Apex code (my only programming experience is some CGI with Perl), so any examples with as much explanation as possible would help.
 
Thanks for any input you may have!
werewolfwerewolf
You don't even need Apex code for this.  Just set the default values on your fields to include the value of the field from the parent Opportunity.
werewolfwerewolf
That is, go to your custom object and hit Edit next to the definition of the field you want to set the default of.  There, you can make a formula that includes the Opportunity field.  If you don't want your users to be able to change that value, then set it to Read Only in the page layout, or take it off the page layout altogether.
RadagastRadagast

Good idea -- Thanks!

I was also thinking of using Field Updates, but the default value is even simpler.

RadagastRadagast

Actually, it looks like I will have to go with my Field Update idea, as SFDC does not allow me to choose any related fields for the default value. I am only allowed to select merge fields of the following field types:

$Organization
$System
$Profile
$User
$UserRole

Am I overlooking something?
vitekvitek
I just tested it with a workflow rule and field update. you can set a rule to activate when a record is first created and then set a field update to update the field from its related opportunity. very cool
i hope this helps.
 
i am looking for an invoicing package myself. can you recommend one that handles basic invoicing functions such as receivables, debtors management, email and print functions, split payments etc
RadagastRadagast
I don't know of many finance packages. Our CFO has looked at a few, but has not found anything that suits his needs and our budget.
vitekvitek
i have found one! It is quite new, but the first release is quite basic. its called coda2go. you can google it for more info and here is one link
 
 
i am interested in anyones thoughts on this product.