• Marella
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 4
    Replies

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 

Thanks,
Veeru

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 

Also i have attached a screenshot for better understanding and any other solution based on the image.

Thanks,
Veeru

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 

Thanks,
Veeru

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.


Thanks,
Veeru

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 
Thanks,
Veeru

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 

Thanks,
Veeru

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 

Also i have attached a screenshot for better understanding and any other solution based on the image.

Thanks,
Veeru

Hi All,

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 

Also i have attached a screenshot for better understanding and any other solution based on the image.

Thanks,
Veeru

Hi All,

 

I had a requirement of adding the oppporunity amount to all of its contact roles. if the contact role added the opportunity, the amount of opportunity has be added to a field "Achieved" on contact Object. The contact might be a contact role on multiple opportunities. If the contact role has been removed from td the opportunity, the respective amount to be subtracted from Achieved field of Opportunity object.

 

Please do let me know how can i get the solution. I appreciate all of your responses with code or any recommendations.

 

Thanks,

Veeru

I would like to have a Dashboard with a table component. For ex, the table component might contains "the top 10 opportunities by amount" or "list of dashboards created by a user" etc. I want all the list of records with the hyperlinks and whenever i clicked on any of the particular link of the record from the dashboard's table component, the respective opportunity or the respective report / dashboard need to be open.


Please do suggest me all the possible ways n methods. Appreciate all of your responses on the above issue.

 

Thanks,

Veeru

I would like to have a Dashboard with a table component. For ex, the table component might contains "the top 10 opportunities by amount" or "list of dashboards created by a user" etc. I want all the list of records with the hyperlinks and whenever i clicked on any of the particular link of the record from the dashboard's table component, the respective opportunity or the respective report / dashboard need to be open.


Please do suggest me all the possible ways n methods. Appreciate all of your responses on the above issue.

 

Thanks,

Veeru

Hi All,

 

I have written two triggers to update the "No of Contacts" for each account.  Both the triggers are working fine. I have implemented the first trigger from the below one and is currently in use. Once i had the trigger working fine, i tried to update the list of accounts with no of contacts by using the data loader. But not able to update multiple accounts with no of contacts field. Please have a look on below triggers:

---------------------------------------------------------------------------------------------------------------------------------------------

trigger tgrContactCount on Contact (after delete, after insert, after undelete, after update) {
    
    Contact [] con;
    if(Trigger.isDelete || Trigger.isUpdate)
    {
        con = trigger.old;
    }
    if(Trigger.isInsert || Trigger.isUpdate || Trigger.isUnDelete)
    {
        con = trigger.new;
    }
    String cid = null;
    cid = con[0].AccountId;        
   
    Integer i = [select count() from Contact where AccountId = :cid];    

        // update the account record
    Account [] a =[select id, No_of_Contacts__c from Account where id = :cid];
 
    a[0].No_of_Contacts__c = i;    
        // update database
        update a[0];    

} 

------------------------------------------------------------ 2nd one as below:-------------------------------------------------------

trigger tgrContactCount on Contact (after delete, after insert, after undelete, after update) {
   
    public set<Id> AccIDs = new Set<Id>();
       
    if(Trigger.isInsert || Trigger.isUpdate || Trigger.isUnDelete)
    {
        for(Contact con: Trigger.new)
        {
            AccIds.add(con.AccountId);               
        }
    }
    if(Trigger.isDelete || Trigger.isUpdate)
    {
        for(Contact con: Trigger.old)
        {
            AccIds.add(con.AccountId);
        }
    }
   
    Map<Id, Contact>ConsWithAccs = new Map<ID, Contact>([select Id, AccountId from Contact where AccountId in :AccIds]);
   
    Map<ID, Account>accstoUpdate = new Map<ID, Account>([select Id, No_of_Contacts__c from Account where Id in : AccIds]);
   
    for(Account a :accstoUpdate.values())
    {
        Set<Id>conIds = new Set<Id>();
        for(Contact c : ConsWithAccs.values())
        {
            if(c.AccountId==a.Id)
            conIds.add(c.Id);
        }
       
        if(a.No_of_Contacts__c!=conIds.size())
        a.No_of_Contacts__c=conIds.size();   
    }   
   
    update accstoUpdate.values();
}

------------------------------------------------------------------------------------------------------------------------------

 

Both the triggers are working fine for individual records. But when i tried to mass update, its not working and facing some Limit issues as well. Please do suggest me to use any of the above trigger to handle the bulk updates as well.

 

Hope i am clear in summarising my issue.

 

Thanks,

Veeru

 

  • September 05, 2011
  • Like
  • 0

Hello all,

 

I had an issue in updating an existing work flow. there are 2 situation for workflow to be triggered:

 

1. Had the workflow rule already when any opportunity record is created or modified and not previously not met the criteria which is as below:

 

OR(Industry__c ="a0c40000002P5Sq",
                              Industry__c ="a0c40000002P5Ss",
                               Service__c="a0e400000016tZB") 
                 )


2. Now i need to update the above alert when ever the opportunity stage moved to "Won" also.

 

Finally, my workflow should fire whenever any record is created or edited with the above IDs or if any of the existing record with above IDs moved to the stage "won".

 

Please suggest me on building this workflow rule.

 

Thanks,

Marella

 

I would like to have a Dashboard with a table component. For ex, the table component might contains "the top 10 opportunities by amount" or "list of dashboards created by a user" etc. I want all the list of records with the hyperlinks and whenever i clicked on any of the particular link of the record from the dashboard's table component, the respective opportunity or the respective report / dashboard need to be open.


Please do suggest me all the possible ways n methods. Appreciate all of your responses on the above issue.

 

Thanks,

Veeru

Hi All,

 

I have written two triggers to update the "No of Contacts" for each account.  Both the triggers are working fine. I have implemented the first trigger from the below one and is currently in use. Once i had the trigger working fine, i tried to update the list of accounts with no of contacts by using the data loader. But not able to update multiple accounts with no of contacts field. Please have a look on below triggers:

---------------------------------------------------------------------------------------------------------------------------------------------

trigger tgrContactCount on Contact (after delete, after insert, after undelete, after update) {
    
    Contact [] con;
    if(Trigger.isDelete || Trigger.isUpdate)
    {
        con = trigger.old;
    }
    if(Trigger.isInsert || Trigger.isUpdate || Trigger.isUnDelete)
    {
        con = trigger.new;
    }
    String cid = null;
    cid = con[0].AccountId;        
   
    Integer i = [select count() from Contact where AccountId = :cid];    

        // update the account record
    Account [] a =[select id, No_of_Contacts__c from Account where id = :cid];
 
    a[0].No_of_Contacts__c = i;    
        // update database
        update a[0];    

} 

------------------------------------------------------------ 2nd one as below:-------------------------------------------------------

trigger tgrContactCount on Contact (after delete, after insert, after undelete, after update) {
   
    public set<Id> AccIDs = new Set<Id>();
       
    if(Trigger.isInsert || Trigger.isUpdate || Trigger.isUnDelete)
    {
        for(Contact con: Trigger.new)
        {
            AccIds.add(con.AccountId);               
        }
    }
    if(Trigger.isDelete || Trigger.isUpdate)
    {
        for(Contact con: Trigger.old)
        {
            AccIds.add(con.AccountId);
        }
    }
   
    Map<Id, Contact>ConsWithAccs = new Map<ID, Contact>([select Id, AccountId from Contact where AccountId in :AccIds]);
   
    Map<ID, Account>accstoUpdate = new Map<ID, Account>([select Id, No_of_Contacts__c from Account where Id in : AccIds]);
   
    for(Account a :accstoUpdate.values())
    {
        Set<Id>conIds = new Set<Id>();
        for(Contact c : ConsWithAccs.values())
        {
            if(c.AccountId==a.Id)
            conIds.add(c.Id);
        }
       
        if(a.No_of_Contacts__c!=conIds.size())
        a.No_of_Contacts__c=conIds.size();   
    }   
   
    update accstoUpdate.values();
}

------------------------------------------------------------------------------------------------------------------------------

 

Both the triggers are working fine for individual records. But when i tried to mass update, its not working and facing some Limit issues as well. Please do suggest me to use any of the above trigger to handle the bulk updates as well.

 

Hope i am clear in summarising my issue.

 

Thanks,

Veeru

 

  • September 05, 2011
  • Like
  • 0

Hello all,

 

I had an issue in updating an existing work flow. there are 2 situation for workflow to be triggered:

 

1. Had the workflow rule already when any opportunity record is created or modified and not previously not met the criteria which is as below:

 

OR(Industry__c ="a0c40000002P5Sq",
                              Industry__c ="a0c40000002P5Ss",
                               Service__c="a0e400000016tZB") 
                 )


2. Now i need to update the above alert when ever the opportunity stage moved to "Won" also.

 

Finally, my workflow should fire whenever any record is created or edited with the above IDs or if any of the existing record with above IDs moved to the stage "won".

 

Please suggest me on building this workflow rule.

 

Thanks,

Marella