• NIyathi
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 1
    Replies
Got a custom object named 'Orders'. Orders has a custom field called Customer ( a look up field to Customers object) .
If the Customer name contains 'East region' , I am supposed to send a salesforce user an email alert.

Evaluation criteria : created, and every time it's edited

Rule criteria : Criteria are met

rule  -   Order : Customer ( name ) contains  East region

And then selected the email template in the actions.

Checked the email deleverability . Still the user is not able to get the email.

What am I missing here ?
 
Hi All, I am a salesforce admin trying to move this trigger with 0 % code coverage into prod. I understand the code but not sure how to write a test class. Help !!!!!

trigger UpdateContactInfo on soship__c (before insert) {
   
soship__c[] shipments = Trigger.new;    
Set<String> orderNumbers = new Set<String>();    
Map<Id,sohdr__c> orders = null;   
sohdr__c order = null;

for(soship__c ship : Trigger.new ){
       
     orderNumbers.add(ship.soship_order__c);       
     System.debug('order number '+ship.soship_order__c);    
     }    
    
  
  orders = new Map<Id,sohdr__c>(           
 [Select Id, sohdr_order__c,  sohdr_contact__c, sohdr_conemail__c,sohdr_conphone__c ,sohdr_conmethod__c                  
             from sohdr__c where Id in :orderNumbers]);
       
    for(soship__c shipment:shipments){      
        order = orders.get(shipment.soship_order__c);
        
      if(order != null  ) {                                    
      shipment.soship_contact__c = order.sohdr_contact__c;               
      shipment.soship_email__c = order.sohdr_conemail__c;            
      shipment.soship_phone__c = order.sohdr_conphone__c;          
      shipment.soship_conmethod__c = order.sohdr_conmethod__c;                    
      }else
          {            
         system.debug(' order is null' );                 
          }
           
}

}
} }
}
 
Trigger not getting fired , using an object from managed package.

Trying to update fields in shipper record after insert from the fields of Sales order record.

here is the code, 

trigger UpdateContactInfo on rstk__soship__c (after insert) {
    System.debug('********trigger is called');
    rstk__soship__c[] shipments = Trigger.new;
    rstk__sohdr__c[] orders = null;
    for(rstk__soship__c shipment:shipments){
        orders = [Select    rstk__sohdr_contact__c, rstk__sohdr_conemail__c,rstk__sohdr_conphone__c 
                  from rstk__sohdr__c 
                  where rstk__sohdr_order__c =: shipment.rstk__soship_order__c ];
        
        System.debug('Here in the for loop shipment ordernumber '+shipment.rstk__soship_order__c);
        
        if(orders.size() > 0){
            System.debug('Found the order order name :'+orders[0].rstk__sohdr_contact__c+
                         'email: '+orders[0].rstk__sohdr_conemail__c+
                         'Phone :'+orders[0].rstk__sohdr_conphone__c);
            shipment.rstk__soship_contact__c = orders[0].rstk__sohdr_contact__c;
            shipment.rstk__soship_email__c = orders[0].rstk__sohdr_conemail__c;
            shipment.rstk__soship_phone__c = orders[0].rstk__sohdr_conphone__c;
         }
    }

}

Any suggestion would be very much appreciated. Thanks,
I am new to Apex and I was given this requirement ,Given a list of user Ids, we would like to reset the password for those users . When there are thousands of users in an Org, it is very difficult to select the users in the UI and regenerate password for them.
User will enter a comma separated list of UserIds in a Visualforce page input field and Clicks on a button.
Apex controller is going to grab these ids and reset password for those Ids.

Need help on this.

Thanks.
Hello, 
I have a requirement like this.
Create a Visualforce page:
Enter Role Id: [Input Field]
"Go" button
User enters a RoleId, and clicks on Go button. This will display the Sub Ordinate role Ids under the Role Id that was entered in the page. And the Users that are under each SubOrdinate Role.

Roles:
       RoleId1
               UserId1
               UserId2
       RoleId2
               UserId1
               UserId2
       RoleId3
               UserId1
               UserId2
Please helpme on this.

Thanks,
Niyathi
 
Hello,

I would like to delete some of my old post which contants email address and contact number is still possible to delete here in the forum

thanks
  • January 14, 2016
  • Like
  • 0