• Soledad Angel
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 9
    Replies

Hi,

I am using the hiSoft ContactRolesRequired package, but it is not working properly when cloning opps. Cloning does not carries the contact role, but still triggers on edit screen, which does not allow to add contact role. 

Any solutions you can suggest?

We are using email-to-case in combination with a Flow to automate lead creation in SFDC. So, once an email is received in certain email address a new Case is logged in the system. Then, a Flow finds a case with origin criteria equals to "Lead", creates a new Lead and removes original Case.

This setup works, but does not auto-launch. I need to click on the "Run" button in order for it to trigger. How can I make it auto-launch?
Hi guys,

I got two great triggers in my sandbox (1- makes sure there is an attachment in the opportunity, 2- makes sure there is a contact role assigned in the opportunity), but which I can't deploy to production because of the test code coverage.

As I do not have any coding skills and understanding of this area, can I have one test for all the triggers? how can I do this so I can deploy my triggers?
Hello all,

there is a trigger and validation rule in my org that forces users to add Contact Roles after certain stage of the opp. How can I modify the trigger (below) to force them adding documents?


_________________________________

Custom field> checkbox> "Primary Contact Assigned"

Custom field> number> "Number of Contacts Roles Assigned"

Triger>
trigger updatecontactrolecount on Opportunity (before insert, before update)
{

Boolean isPrimary;
Integer iCount;

Map<String, Opportunity> oppty_con = new Map<String, Opportunity>();//check if the contact role is needed and add it to the oppty_con map
for (Integer i = 0; i < Trigger.new.size(); i++) 
{
        oppty_con.put(Trigger.new[i].id,
        Trigger.new[i]);      
}
isPrimary = False; 
for (List<OpportunityContactRole> oppcntctrle :[select OpportunityId from OpportunityContactRole where (OpportunityContactRole.IsPrimary = True and OpportunityContactRole.OpportunityId in :oppty_con.keySet())])
{
 if (oppcntctrle .Size() >0)
 {
 isPrimary = True;     
 }
}
iCount = 0;
for (List<OpportunityContactRole> oppcntctrle2 : [select OpportunityId from OpportunityContactRole where (OpportunityContactRole.OpportunityId in :oppty_con.keySet())])//Query for Contact Roles
{    
 if (oppcntctrle2 .Size()>0)
 {
 iCount= oppcntctrle2 .Size();     
 }
}
for (Opportunity Oppty : system.trigger.new) //Check if  roles exist in the map or contact role isn't required 
{
Oppty.Number_of_Contacts_Roles_Assigned__c = iCount;
Oppty.Primary_Contact_Assigned__c =isPrimary; 
}
}
Hi,

I am trying to do some forecasting, so I created Head count (#) and  a Revenue field (formula, rate * Head count * Probability)  and now I need to calculate impact on FY. 

My formula is very basic (see below), the issue is that I can only go to 9, not to 12 as needed, I get the error "too large to compile".

Suggestions?

_________________________

CASE(

ROUND((( DATEVALUE( "2015-04-01" ) - CloseDate ) / 30 ), 0 ),

1, WRM_1__c ,
2, ( WRM_1__c + WRM_2__c ) ,
3, ( WRM_1__c + WRM_2__c + WRM_3__c ) ,
4, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c ) ,
5, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c + WRM_5__c ) ,
6, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c + WRM_5__c + WRM_6__c  ) ,
7, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c + WRM_5__c + WRM_6__c + WRM_7__c ) ,


0
)

Hi,

I am using the hiSoft ContactRolesRequired package, but it is not working properly when cloning opps. Cloning does not carries the contact role, but still triggers on edit screen, which does not allow to add contact role. 

Any solutions you can suggest?

Hello all,

there is a trigger and validation rule in my org that forces users to add Contact Roles after certain stage of the opp. How can I modify the trigger (below) to force them adding documents?


_________________________________

Custom field> checkbox> "Primary Contact Assigned"

Custom field> number> "Number of Contacts Roles Assigned"

Triger>
trigger updatecontactrolecount on Opportunity (before insert, before update)
{

Boolean isPrimary;
Integer iCount;

Map<String, Opportunity> oppty_con = new Map<String, Opportunity>();//check if the contact role is needed and add it to the oppty_con map
for (Integer i = 0; i < Trigger.new.size(); i++) 
{
        oppty_con.put(Trigger.new[i].id,
        Trigger.new[i]);      
}
isPrimary = False; 
for (List<OpportunityContactRole> oppcntctrle :[select OpportunityId from OpportunityContactRole where (OpportunityContactRole.IsPrimary = True and OpportunityContactRole.OpportunityId in :oppty_con.keySet())])
{
 if (oppcntctrle .Size() >0)
 {
 isPrimary = True;     
 }
}
iCount = 0;
for (List<OpportunityContactRole> oppcntctrle2 : [select OpportunityId from OpportunityContactRole where (OpportunityContactRole.OpportunityId in :oppty_con.keySet())])//Query for Contact Roles
{    
 if (oppcntctrle2 .Size()>0)
 {
 iCount= oppcntctrle2 .Size();     
 }
}
for (Opportunity Oppty : system.trigger.new) //Check if  roles exist in the map or contact role isn't required 
{
Oppty.Number_of_Contacts_Roles_Assigned__c = iCount;
Oppty.Primary_Contact_Assigned__c =isPrimary; 
}
}
Hi,

I am trying to do some forecasting, so I created Head count (#) and  a Revenue field (formula, rate * Head count * Probability)  and now I need to calculate impact on FY. 

My formula is very basic (see below), the issue is that I can only go to 9, not to 12 as needed, I get the error "too large to compile".

Suggestions?

_________________________

CASE(

ROUND((( DATEVALUE( "2015-04-01" ) - CloseDate ) / 30 ), 0 ),

1, WRM_1__c ,
2, ( WRM_1__c + WRM_2__c ) ,
3, ( WRM_1__c + WRM_2__c + WRM_3__c ) ,
4, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c ) ,
5, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c + WRM_5__c ) ,
6, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c + WRM_5__c + WRM_6__c  ) ,
7, ( WRM_1__c + WRM_2__c + WRM_3__c + WRM_4__c + WRM_5__c + WRM_6__c + WRM_7__c ) ,


0
)