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
SrenagSrenag 

Updating the custom object fields from standard object fields

HI,

 

I have a scenario where we have build custom object Assignments which is basically an extension to Standard object opportunity (There will be multiple assignements linked to each opportunity)

 

The issue is we would like to flow some information from opportunity object to Assignment object ex : account name both should have same account name and it should get populated automatically once the new assignment is created and opportunity is selected in assignment.

 

Both Opportunity and assignment have lookup relationship with Account

 

Regards

 

Srdhar

jhenningjhenning
You can create a Formula Field on the Assignment object named "Account Name". In the formula enter "Account.Name". This is called a cross-object formula field.
cricketlangcricketlang

you can also do this through a button which can populate the values for you AND allow you to edit those. with a formula field they are not editable and will always be the same.

 

Example 

 

The user would go to the opportunity FIRST

you can place a button here which will pull data from the current opportunity and place it into your specefied fields in Assignments.

 

Since they are not formula fileds the user can change the values if needed to whatever is appropriate.

 

If you need any help with this let me know and i can help you create the button

Ispita_NavatarIspita_Navatar

I need to know few things:-


1. From your code it seems PhaseIII object is related via lookup relationship with the account? Is that so?


2. If answer to 1. is yes then a similar relationship with opportunity will be needed to achieve what you want that is assessing the PhaseIII object


3. Now coming to the other part to access the account information for that you need to the related information onto Opportunity level with the help of "Formula Field".


Say   you have a formula field "XYZ" set to Account.State_of_the_Union__c, repeat for other field


Now for the button code it will somewhat like this:-


/a09/e?id={!Opportunity.Phase_IIIId__c}&00N80000004I201={!Opportunity.XYZ__c}&00N80000004I206
here XYZ stores Account.Stae_of_Union__c at opportunity


The rest also will be replaced accordingly by rspective formula fields at opportunity level:-

={!Account.Objective__c}&00N80000004I20B={!Account.Critical_Success_Factors__c}&00N80000004I20G={!Account.Customers_Strategy__c}&00N80000004I20L={!Account.Winnable_Position__c}&00N80000004I20Q={!Account.Supporting_Tactics__c}&00N80000004I20V={!Account.Competitors_Strategy__c}

Hope this helps.