• Sarath R
  • 0 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
  • 1
Can someone please help me write a test class for this class

 //This is a Class that updates user email address when changed on Contact Object
public class ContactTriggerClass {
    string text1='New Reviewer';
    public contactTriggerClass(){}
    //This is the method where it checks if both contact email and user email are same and updates accordingly
    public void changeuseremailfromContact(Contact c)
       Contact cnt=[select email from Contact where id=:c.Id];//This gives Emailid and Email of that Contact where trigger is fired
    string emailid=string.valueof(cnt.Email);//getting only email Id
    system.debug('The Email id is:' + emailid);
    User usr=[select Email,Username from User where ContactId=:c.Id];//contact
    system.debug('The contact Email is' + cnt.Email);
    system.debug('The new email is :' + c.Email);
    if(c.Email!=usr.email)//if both emails are different then update user with new
        system.debug('The new User Email is' + usr.Email );
        System.debug('The updated user is' + usr);
    //This is a method based on contact reviewer status changing the profile of the user automatically
    public void updateuserprofile(contact ct)
         User u=[select Id,Email,Username from User where contactid=:ct.id];

I want to create a button that will display the 'Industry' field in my leads and allow me to update that field.

I've created a text field but not sure how to display the industry field here and update it. 

Can anyone help??

I need help in writing a javascript code for a button ( 'on click action' ) that should display a picklist field and allow me to update the record based on the piclikst. ( like changing the industry in the lead tab )
hi all,

I urgently need to edit/delete a post made by me on this discussion forum...But its not allowing me to do so and pops up
saying that 'you cant delete this question as others are interested in it'.
There are no likes and no comments on it still i am unable  to delete it
Any help would be highly appreciated

Its very urgent,