• babloo123
  • NEWBIE
  • 70 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 57
    Questions
  • 37
    Replies
I am using few merge fields of custom Object on a email template those work fine if I use test and send verify button with merge field values poping for the record of custom object but when condition is met and the template is fired the email template fires but now the merge fields not  appear. Checked the owds and Security as well. Can any one guide stuck on this from many days.
I have a trigger on custom objectA that updates custom Object B but I have another trigger on Custom Object B on update Event but when I run trigger 1 the trigger 2 is being automatically called due to the object B being same. Can some one guide how to prevent this.
Need to create a visual force email template on a custom Object to view fields (merge fields on that object) can some one guide how?

if any example some one has?
I have a scenario where my custom object record standard page when edited and saved moves back to home page instead of staying back on detail page. Can some one guide how to solve this issue.
Can some one guide me how to prevent users from going back and entering details on VF page after clicking submit as submit function locks the page to edit further. But id he clicks back again the page opens need some guidance on this if any one has come across this issue?
I have a scenario where I need to create a custom link when clicked on that link I need my contact record to open up. Can some one guide me how to get this done
Hi I have a scenario where the contact has a checkbox called IS user active which has to be updated as and when user becomes inactive to false.

I wrote a trigger to do it showed me a mixed DML error and wrote the below code using future method as well now I am getting another error. Need some help on this

Trigger.

trigger Checkuseractive on User (after update) {

    user u=[select id,Isactive,contactid from user where id=:trigger.new[0].id];
    Id cid=u.ContactId;
if(trigger.new[0].IsActive=='false') 
{
    contactactivecheckboxclass.updatecnt(cid);
}
    
}

Future Method

public class contactactivecheckboxclass {
@future
    public static void Updatecnt(id x)
    contact c=[select Is_user_Active__c from Contact where id=:x];
    c.Is_User_Active__c=false;
    update c;
}

Error : Unexpected token :Contact on class line 4
Instead of using salesforce standardpage I have been using my custom VFpage to save a record. My requirement is to get the VF page back with the selections I have chosen on the page when I click Edit button can someone help on this stuck on this from longtime.
I want to display my VF page with the values I selected on clicking edit can someone guide me how?
I am getting a issue when I am trying to update by Email id on Contact which inturns updates the username on userobject and email on UserObject.Please can some one guide how to overcome this I need to change the ProfileID as well using the trigger.

trigger Trigger12 on Contact (before update) {
    
    System.debug(trigger.new[0].ID);
    
      Contact cnt=[select email from Contact where id=:trigger.new[0].Id];
    system.debug(cnt);
    String emailid=string.valueof(cnt.Email);
    system.debug('The Email id is:' + emailid);
    
    User usr=[select Email,Username from User where ContactId=:trigger.new[0].Id];
    system.debug(usr);
    
    if(trigger.new[0].Email!=cnt.Email)
    {
        usr.Email=trigger.new[0].Email;
    usr.username=trigger.new[0].Email; 
    }
    update usr;
    }