• Neeraja
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 7
    Replies
I need to write a trigger for the following scenario using Map. 
I should be able to retrieve Salesforce Id from a parent object whenever the value in child object matches with the Parent object.
The relationship between is the objects is lookup. I really appreicate if someone helps me with this trigger.

Thanks,
Neeraja
Hi,
I have created a site and add a visualforce page. Whenever I click the URL
it is showing the following error
Error:
Account: Insufficient access [master_account__c]. I gave all the necessary permission to the 
profile. Please can somebody help me with this?
Thanks,
Neeraja
I need help for the following. I need to create a visualforce page (data input form ) using 
one standard object(Contact) and one custom object(Testresults). They have a lookup relationship. I know 
I need to write an extension but I am new to coding. Is there any way I can do this without any coding?
Thank you.
trigger Autounfollowopp on Opportunity (after insert,after update) {
set<id> oppid = new set<id>();
    for(opportunity opp:trigger.new){
        if(opp.StageName=='closed won')
            oppid.add(opp.Id);
           }
    list<opportunity> opportunity=[select id, createdby.name from opportunity where id in:oppid];
    
    for(user users : [select id from user ])
        {
          EntitySubscription[] followingES = [select id, parentid, subscriberid, parent.name from EntitySubscription where subscriberid = :users.id];
            Map<string,string> following = new Map<string,string> ();
            for( EntitySubscription Entitysub : followingES )
            following.put( Entitysub.parentid, Entitysub.parent.name );  
             If(opportunity [0].createdby.name == 'xxxx'
                    {
                    EntitySubscription follow = new EntitySubscription (parentId <>:opportunity [0].id,subscriberid = users.id);
                    delete follow;
                    }
      }
        
}
  • September 16, 2015
  • Like
  • 0
I need to write a trigger for the following scenario using Map. 
I should be able to retrieve Salesforce Id from a parent object whenever the value in child object matches with the Parent object.
The relationship between is the objects is lookup. I really appreicate if someone helps me with this trigger.

Thanks,
Neeraja
Hi,
I have created a site and add a visualforce page. Whenever I click the URL
it is showing the following error
Error:
Account: Insufficient access [master_account__c]. I gave all the necessary permission to the 
profile. Please can somebody help me with this?
Thanks,
Neeraja
I need help for the following. I need to create a visualforce page (data input form ) using 
one standard object(Contact) and one custom object(Testresults). They have a lookup relationship. I know 
I need to write an extension but I am new to coding. Is there any way I can do this without any coding?
Thank you.
trigger Autounfollowopp on Opportunity (after insert,after update) {
set<id> oppid = new set<id>();
    for(opportunity opp:trigger.new){
        if(opp.StageName=='closed won')
            oppid.add(opp.Id);
           }
    list<opportunity> opportunity=[select id, createdby.name from opportunity where id in:oppid];
    
    for(user users : [select id from user ])
        {
          EntitySubscription[] followingES = [select id, parentid, subscriberid, parent.name from EntitySubscription where subscriberid = :users.id];
            Map<string,string> following = new Map<string,string> ();
            for( EntitySubscription Entitysub : followingES )
            following.put( Entitysub.parentid, Entitysub.parent.name );  
             If(opportunity [0].createdby.name == 'xxxx'
                    {
                    EntitySubscription follow = new EntitySubscription (parentId <>:opportunity [0].id,subscriberid = users.id);
                    delete follow;
                    }
      }
        
}
  • September 16, 2015
  • Like
  • 0