• A
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 4
    Replies
Hi,

In Case auto-response rule ,I've created one rule entry.In this,at Step 3: I mentioned one email address in  Reply-to Address filed.But when I click on reply to the auto response mail , it is not showing the email which I mentioned in Reply-to Address.

Here Created Organization-Wide Email Addresses with the Reply-to Address email id.

In my personal instance , Did the same configuration and is working fine.But I am facing the diffcult in sandbox.

Thanks for the help in advance.

Regards,
   A


 
  • April 06, 2016
  • Like
  • 0
Hello All.


I am creating report on Users, but i can see the date field as Chatter adoption Stage modified date field

could you please know what is this field does,
  • March 18, 2016
  • Like
  • 1
Hi Folks,

While sending mail from lotus notes by writing subject  in Chinese language, case is getting created with different subject i.e UTF characters(Not the same sentance which we mentioned in subject)

Thanks in advance.

Thanks,
   A
  • January 29, 2016
  • Like
  • 0
Hi ,
 Below is the error I'm getting while sharing from one community user to another user

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY: insufficient access rights on cross-reference id.

I was able to see the error in debug log.

Can any one plese help me out here.

Please find below code:

trigger ArticleShare on Article__c (after insert,After update) {
public list<Article__Share> artShareList = new list<Article__Share>();
public list<FeedItem> listOfFeedFiles = new List<FeedItem>();
public attachment objAttachment;
public string usId;
   if(trigger.isAfter){
       if(trigger.isInsert){
           for (article__c a : trigger.new){
               if(a.domain__c!=null || a.domain__c!=''){
               system.debug('__________a.domain__c_______'+a.domain__c);
               for(user u :[select id,name from user where email=:a.domain__c  limit 1]){
                   usId = u.id;
                   system.debug('__________u.id______'+u.id);    
                   //UserOrGroupId  a.Owner.UserRoleId rowCause ='Apex Share' Owner.UserRoleId;
                   system.debug('______a.Owner.UserRoleId_________'+a.Owner.UserRoleId);
                   system.debug('______a.OwnerId________'+a.OwnerId);
                   system.debug('__________u.id______'+u.id);    
                   //system.debug('______u.Owner.UserRoleId______'+u.Owner.UserRoleId);
                   //system.debug('__________u.id______'+u.OwnerId);    
                   Article__Share newartShare = new Article__Share (ParentId  = a.id,UserOrGroupId =u.id,AccessLevel='Read');
                   artShareList.add(newartShare);
                   system.debug('__________artShareList______'+artShareList);    
               }
               
                      
               }
           }
           //insert artShareList ;
           
           
            try {
            Database.SaveResult[] shareInsertResult = Database.insert(artShareList,false);
             for (Database.SaveResult sr : shareInsertResult) {
            if (sr.isSuccess()) {
                
                System.debug('_____Successfully inserted account. Account ID:___ ' + sr.getId());
            }
            else {
                
                for(Database.Error err : sr.getErrors()) {
                    System.debug('_______The following error has occurred___________.'+err.getMessage());                    
                    System.debug(err.getStatusCode() + ': ' + err.getMessage());
                    
                }
            }
        }

        } 
        catch (Exception e) {
            System.debug(e.getTypeName() + ' - ' + e.getCause() + ': ' + e.getMessage());
        }
           
           
           
       }
   }
   if(trigger.isAfter){
       if(trigger.isUpdate){
           for (Article__c a : trigger.new){
               if(a.domain__c!=null || a.domain__c!=''){
                   
                       for(user u :[select id,name from user where email=:a.domain__c  limit 1]){
                       Article__Share newartShare = new Article__Share (ParentId = a.id,UserOrGroupId =u.id,AccessLevel='Read');
                       artShareList.add(newartShare);
                      
                       
                   }
                   
               }
        
               }
               
               
              //insert artShareList;
              
               try {
            Database.SaveResult[] shareInsertResult = Database.insert(artShareList,false);
             for (Database.SaveResult sr : shareInsertResult) {
            if (sr.isSuccess()) {
                // Operation was successful, so get the ID of the record that was processed
                System.debug('_____Successfully inserted account. Account ID:___ ' + sr.getId());
            }
            else {
                // Operation failed, so get all errors                
                for(Database.Error err : sr.getErrors()) {
                    System.debug('_______The following error has occurred___________.'+err.getMessage());                    
                    System.debug(err.getStatusCode() + ': ' + err.getMessage());
                    //System.debug(err.getTypeName() + ' - ' + err.getCause() + ': ' + err.getMessage());
                    
                }
            }
        }
        } 
        catch (Exception e) {
            System.debug(e.getTypeName() + ' - ' + e.getCause() + ': ' + e.getMessage());
        }
           }
           
           
          
       }
   

}
  • September 18, 2015
  • Like
  • 0
Hi All,

Can any one please share the code for Apex sharing to the attachment of case object?

Thanks,
  A
  • September 14, 2015
  • Like
  • 0
Hi All,

I have one VF page i.e VF1 with the controller C1.Parent page on which I'm clicking the img , next to input text. and showing the popup with below page & controller.

I have another Vf page(Popup Screen Page) i.e VF2 with the controller C2.(For popup screen).By clicking the button on this screen,I'm calling the method in C2.In this method,  I'm storing few values in string and list variables and closing that popup screen from the same method.

while closing popup screen, I need to assign that string to VF1 input text field(same as lookup functionality) and C1 variable and  that list to C1 list variable with out refreshing VF1 page.

Any one please guide on this.Thanks for taking time to help me!!


Thanks,
  • September 13, 2015
  • Like
  • 0
Hi Floks,

Can any one please share the code(vf,controller) for Multi-select Custom lookup?

Thanks for taking time to help! 
  • September 12, 2015
  • Like
  • 0
Hi,

I'm writing a batch apex to delete records which are in lakhs.So before deleting them, i want all the records to be store in one .CSV(or .xls(Excel)) formate.

Let me know the code for this..

any help would be very much appreciated


Thanks
  • April 02, 2014
  • Like
  • 1
Hi Friends,
please help me..its very urgent...

I have been trying to redirect site to the url given.
For example if we take salesforce if i give account details page url page and login with the credentials it goes to the particular account detail page, i want the same functionality in sites.

For that i have written the below code...its working for every page except the event detailpage( url is https://fulltest-future-leaders.cs30.force.com/FLIP/EventDetail?eid=a5H80000000Go61EAC&showComments=true&backUrl=/Events)

/**
* An apex page controller that exposes the site login functionality
*/
global class SiteLoginController {

    //Properties to store username and password entered by the user
    global String username {get; set;}
    global String password {get; set;}
    global String profileName {get; set;}
    global String urlredirect {get; set;}
    global String urlredirectSF {get; set;}
    global String urlredirectSFbase {get; set;}
   
     global SiteLoginController()
     {
       urlredirect= URL.getCurrentRequestUrl().toExternalForm();
       urlredirectSF= URL.getSalesforceBaseUrl().toExternalForm();
       urlredirectSFbase= string.valueof(URL.getSalesforceBaseUrl());
     }
    //Method to check the username and password. It will throw error if the username/password is incorrect
    global PageReference login() {
        //Setting profile Name
        profileName = '';
        //Setting start URL
        String startUrl = '/apex/FLIPHome';
        String flipredirect = '/apex/'+urlredirect.subStringAfter('FLIP/');
        system.debug('----urlredirect----'+urlredirect);
        system.debug('----urlredirectSF----'+urlredirectSF);
        system.debug('----urlredirectSFbase----'+urlredirectSFbase);
       // String eventurl ='apex/Eventdetails/'+urlredirect.subStringBetween('Events','&');
       // String eventurl ='apex/Eventdetails/'+urlredirect.subStringAfter('/Events')+'showComments=true';
     //   String eventurl ='/apex/EventDetail/'+urlredirect.subStringAfter('FEvents');
    //   system.debug('----eventurl----'+eventurl);
    //   system.debug('----flipredirect----'+flipredirect);
      
       //Query Profile Name
       List<User> loginUser = [select ProfileId,username,Profile.Name from user where Username = :username];
       if(loginUser.size()>0)
       profileName = loginUser[0].Profile.Name;
      
       system.debug('-------Profile Name--------'+ profileName);
       if(profileName.equals('FLIP Participant') || profileName.equals('Readonly Participant'))
       {
       if(urlredirect.contains('LoginPage'))
         {
          system.debug('-------coming to login-------'+ urlredirect);
          return Site.login(username, password, startUrl  );
         }
   /*  else if(urlredirect.contains('EventDetail'))
         {
          system.debug('-------coming to event-----'+ urlredirect);
         return Site.login(username, password, eventurl  );
         } */
         else  { system.debug('value of startURL.....'+flipredirect);
         return Site.login(username, password, flipredirect );
        }
       }
        
       else if(profileName.equals('Executive Coach'))
       {
        startUrl = '/apex/MarketplaceHome';
        return Site.login(username, password, startUrl );
       }
       else if(profileName.equals('LI Participant'))
       {
        startUrl = '/apex/LIHome';
        return Site.login(username, password, startUrl );
       }
       else
       return Site.login(username, password, startUrl);
    }
   
   


Is there any problem with my code??????????
Or please suggest how can I navigate to a page based on URL....
Waiting for your help guys.......................
  • February 07, 2014
  • Like
  • 1

Hi ,

 

I want to remove setup from user menu for one profile.

Please guide me to solve this.

 

Regards,

Aravind

9701508070

  • August 21, 2013
  • Like
  • 0
Hello All.


I am creating report on Users, but i can see the date field as Chatter adoption Stage modified date field

could you please know what is this field does,
  • March 18, 2016
  • Like
  • 1
Hi,

I'm writing a batch apex to delete records which are in lakhs.So before deleting them, i want all the records to be store in one .CSV(or .xls(Excel)) formate.

Let me know the code for this..

any help would be very much appreciated


Thanks
  • April 02, 2014
  • Like
  • 1
Hi Friends,
please help me..its very urgent...

I have been trying to redirect site to the url given.
For example if we take salesforce if i give account details page url page and login with the credentials it goes to the particular account detail page, i want the same functionality in sites.

For that i have written the below code...its working for every page except the event detailpage( url is https://fulltest-future-leaders.cs30.force.com/FLIP/EventDetail?eid=a5H80000000Go61EAC&showComments=true&backUrl=/Events)

/**
* An apex page controller that exposes the site login functionality
*/
global class SiteLoginController {

    //Properties to store username and password entered by the user
    global String username {get; set;}
    global String password {get; set;}
    global String profileName {get; set;}
    global String urlredirect {get; set;}
    global String urlredirectSF {get; set;}
    global String urlredirectSFbase {get; set;}
   
     global SiteLoginController()
     {
       urlredirect= URL.getCurrentRequestUrl().toExternalForm();
       urlredirectSF= URL.getSalesforceBaseUrl().toExternalForm();
       urlredirectSFbase= string.valueof(URL.getSalesforceBaseUrl());
     }
    //Method to check the username and password. It will throw error if the username/password is incorrect
    global PageReference login() {
        //Setting profile Name
        profileName = '';
        //Setting start URL
        String startUrl = '/apex/FLIPHome';
        String flipredirect = '/apex/'+urlredirect.subStringAfter('FLIP/');
        system.debug('----urlredirect----'+urlredirect);
        system.debug('----urlredirectSF----'+urlredirectSF);
        system.debug('----urlredirectSFbase----'+urlredirectSFbase);
       // String eventurl ='apex/Eventdetails/'+urlredirect.subStringBetween('Events','&');
       // String eventurl ='apex/Eventdetails/'+urlredirect.subStringAfter('/Events')+'showComments=true';
     //   String eventurl ='/apex/EventDetail/'+urlredirect.subStringAfter('FEvents');
    //   system.debug('----eventurl----'+eventurl);
    //   system.debug('----flipredirect----'+flipredirect);
      
       //Query Profile Name
       List<User> loginUser = [select ProfileId,username,Profile.Name from user where Username = :username];
       if(loginUser.size()>0)
       profileName = loginUser[0].Profile.Name;
      
       system.debug('-------Profile Name--------'+ profileName);
       if(profileName.equals('FLIP Participant') || profileName.equals('Readonly Participant'))
       {
       if(urlredirect.contains('LoginPage'))
         {
          system.debug('-------coming to login-------'+ urlredirect);
          return Site.login(username, password, startUrl  );
         }
   /*  else if(urlredirect.contains('EventDetail'))
         {
          system.debug('-------coming to event-----'+ urlredirect);
         return Site.login(username, password, eventurl  );
         } */
         else  { system.debug('value of startURL.....'+flipredirect);
         return Site.login(username, password, flipredirect );
        }
       }
        
       else if(profileName.equals('Executive Coach'))
       {
        startUrl = '/apex/MarketplaceHome';
        return Site.login(username, password, startUrl );
       }
       else if(profileName.equals('LI Participant'))
       {
        startUrl = '/apex/LIHome';
        return Site.login(username, password, startUrl );
       }
       else
       return Site.login(username, password, startUrl);
    }
   
   


Is there any problem with my code??????????
Or please suggest how can I navigate to a page based on URL....
Waiting for your help guys.......................
  • February 07, 2014
  • Like
  • 1
Hi ,
 Below is the error I'm getting while sharing from one community user to another user

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY: insufficient access rights on cross-reference id.

I was able to see the error in debug log.

Can any one plese help me out here.

Please find below code:

trigger ArticleShare on Article__c (after insert,After update) {
public list<Article__Share> artShareList = new list<Article__Share>();
public list<FeedItem> listOfFeedFiles = new List<FeedItem>();
public attachment objAttachment;
public string usId;
   if(trigger.isAfter){
       if(trigger.isInsert){
           for (article__c a : trigger.new){
               if(a.domain__c!=null || a.domain__c!=''){
               system.debug('__________a.domain__c_______'+a.domain__c);
               for(user u :[select id,name from user where email=:a.domain__c  limit 1]){
                   usId = u.id;
                   system.debug('__________u.id______'+u.id);    
                   //UserOrGroupId  a.Owner.UserRoleId rowCause ='Apex Share' Owner.UserRoleId;
                   system.debug('______a.Owner.UserRoleId_________'+a.Owner.UserRoleId);
                   system.debug('______a.OwnerId________'+a.OwnerId);
                   system.debug('__________u.id______'+u.id);    
                   //system.debug('______u.Owner.UserRoleId______'+u.Owner.UserRoleId);
                   //system.debug('__________u.id______'+u.OwnerId);    
                   Article__Share newartShare = new Article__Share (ParentId  = a.id,UserOrGroupId =u.id,AccessLevel='Read');
                   artShareList.add(newartShare);
                   system.debug('__________artShareList______'+artShareList);    
               }
               
                      
               }
           }
           //insert artShareList ;
           
           
            try {
            Database.SaveResult[] shareInsertResult = Database.insert(artShareList,false);
             for (Database.SaveResult sr : shareInsertResult) {
            if (sr.isSuccess()) {
                
                System.debug('_____Successfully inserted account. Account ID:___ ' + sr.getId());
            }
            else {
                
                for(Database.Error err : sr.getErrors()) {
                    System.debug('_______The following error has occurred___________.'+err.getMessage());                    
                    System.debug(err.getStatusCode() + ': ' + err.getMessage());
                    
                }
            }
        }

        } 
        catch (Exception e) {
            System.debug(e.getTypeName() + ' - ' + e.getCause() + ': ' + e.getMessage());
        }
           
           
           
       }
   }
   if(trigger.isAfter){
       if(trigger.isUpdate){
           for (Article__c a : trigger.new){
               if(a.domain__c!=null || a.domain__c!=''){
                   
                       for(user u :[select id,name from user where email=:a.domain__c  limit 1]){
                       Article__Share newartShare = new Article__Share (ParentId = a.id,UserOrGroupId =u.id,AccessLevel='Read');
                       artShareList.add(newartShare);
                      
                       
                   }
                   
               }
        
               }
               
               
              //insert artShareList;
              
               try {
            Database.SaveResult[] shareInsertResult = Database.insert(artShareList,false);
             for (Database.SaveResult sr : shareInsertResult) {
            if (sr.isSuccess()) {
                // Operation was successful, so get the ID of the record that was processed
                System.debug('_____Successfully inserted account. Account ID:___ ' + sr.getId());
            }
            else {
                // Operation failed, so get all errors                
                for(Database.Error err : sr.getErrors()) {
                    System.debug('_______The following error has occurred___________.'+err.getMessage());                    
                    System.debug(err.getStatusCode() + ': ' + err.getMessage());
                    //System.debug(err.getTypeName() + ' - ' + err.getCause() + ': ' + err.getMessage());
                    
                }
            }
        }
        } 
        catch (Exception e) {
            System.debug(e.getTypeName() + ' - ' + e.getCause() + ': ' + e.getMessage());
        }
           }
           
           
          
       }
   

}
  • September 18, 2015
  • Like
  • 0
Hi All,

Can any one please share the code for Apex sharing to the attachment of case object?

Thanks,
  A
  • September 14, 2015
  • Like
  • 0
Hi Floks,

Can any one please share the code(vf,controller) for Multi-select Custom lookup?

Thanks for taking time to help! 
  • September 12, 2015
  • Like
  • 0

Hi ,

 

I want to remove setup from user menu for one profile.

Please guide me to solve this.

 

Regards,

Aravind

9701508070

  • August 21, 2013
  • Like
  • 0