• Jean-Luc
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
I just want to create a Contact related to a Person Account but in the lookup filter I only access the Business Accounts, the Person Accounts being not displayed...
If I leave the Account Name empty, the Contact becomes "Private" and in the "Related Accounts" list I'm unable to link a "Private" to an Account (Person or Business) !?!
It's very critical!
Thanks & Regards
Jean-Luc
 
Hello
In the Opportunity object, I created three record types and two custom fields:
- a picklist "Opportunity Sub-type" controlling 
- a picklist "Funnel Stages" with in fact exactly the same values as the picklist standard field "StageName"
The purpose is to limit in the different record types the stages to use for each Opportunity Sub-Type.
As the field StageName is mandatory on Opportunity and not possible to define field dependencies with, I created a trigger to sync the StageName value when the same one is selected in the "Funnel_Stages__c" picklist.
------------
trigger UpdateSource on Opportunity (after update) 
{                                                                      
  List<Opportunity> opportunitiesToUpdate = new List<Opportunity>();     
  for(Opportunity currOpportunity : trigger.new) 
  {
    currOpportunity.StageName= currOpportunity.Funnel_Stages__c;          
    leadsToUpdate.add(currOpportunity);                                       
  }
  update opportunitiesToUpdate;                                        
}
--------------------
Not error when compiled but well when activated as I had thefollowing error message on the Opportunity page:
-------------------
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger UpdateSource caused an unexpected exception, contact your administrator: UpdateSource: execution of AfterUpdate caused by: System.FinalException: Record is read-only: Trigger.UpdateSource: line 6, column 1
-----------------
Can somebody help me?
Thanks already.
Best regards
Jean-Luc

Hello,

For the project I'm working on, I need to be able to link one opportunity to one or more others.

 

But when the link is made in one direction, it has to be done in the other.

If A is linked to B, B is automatically linked to A.

 

Looks trivial but your help is welcome!

Thks & Rgds

Hello
In the Opportunity object, I created three record types and two custom fields:
- a picklist "Opportunity Sub-type" controlling 
- a picklist "Funnel Stages" with in fact exactly the same values as the picklist standard field "StageName"
The purpose is to limit in the different record types the stages to use for each Opportunity Sub-Type.
As the field StageName is mandatory on Opportunity and not possible to define field dependencies with, I created a trigger to sync the StageName value when the same one is selected in the "Funnel_Stages__c" picklist.
------------
trigger UpdateSource on Opportunity (after update) 
{                                                                      
  List<Opportunity> opportunitiesToUpdate = new List<Opportunity>();     
  for(Opportunity currOpportunity : trigger.new) 
  {
    currOpportunity.StageName= currOpportunity.Funnel_Stages__c;          
    leadsToUpdate.add(currOpportunity);                                       
  }
  update opportunitiesToUpdate;                                        
}
--------------------
Not error when compiled but well when activated as I had thefollowing error message on the Opportunity page:
-------------------
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger UpdateSource caused an unexpected exception, contact your administrator: UpdateSource: execution of AfterUpdate caused by: System.FinalException: Record is read-only: Trigger.UpdateSource: line 6, column 1
-----------------
Can somebody help me?
Thanks already.
Best regards
Jean-Luc
Hello,

On my custom object "Project" (), I have the custom field, "Status" (MPM4_BASE__Status__c). Whenever this status is updated, I need it to instantly update to the custom "Project Status" field on the Account object (Project_Status__c). I know this can be accomplished with a formula field, but I need this trigger to happen immediately without any edits on the Account, and need the "Project Status" field to remain as a picklist field. How do I write the trigger and class for this? Thanks so much!