• Komal Wagh
  • NEWBIE
  • 45 Points
  • Member since 2018

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
Hello All,
I have exported all the data from the Professional edition Salesforce Org. However I have all the data from the available objects, but the data of the Salesforce Internal object 'ContentNote' is missing.

As the API is not enabled in this org, I cannot even query it in the Org.

If anyone know hows to export the ContentNote Data from the Salesforce Professional Edition Org, please guide me about it. It is very very important and it needs to be completed today itself.

Thanks in advance..!!

Regards,
Rohan Ravindra Saraf
This is my Apex class

public class ExportEmailMessageDataController {
    Public Static List<Case> documents{get;set;}
    Public Static List<EmailMessage> Doc{get;set;}
    public ExportEmailMessageDataController(ApexPages.StandardSetController controller){
    }
    public Static Void getEmailMessage(){
        documents = [SELECT Id, (SELECT Id, ParentId, TextBody, Headers, Subject, FromName, FromAddress, ToAddress, BccAddress,CcAddress, Incoming, HasAttachment, Status FROM EmailMessages)From Case Where Status = 'Closed'];
        // List<EmailMessage> em =[SELECT LastModifiedDate, Id, Subject,ParentId FROM EmailMessage where LastModifiedDate <= LAST_N_DAYS:30 ];
        system.debug('documents'+documents);
        String replaceBr = '';
        Doc = new List<EmailMessage>();
        for(Case c : documents){
            system.debug('c.EmailMessages'+c.EmailMessages);
            if(c.EmailMessages!=null){
                system.debug('In email message');
                for(EmailMessage em : c.EmailMessages){
                    system.debug('check email message');
                      if( em.TextBody != NULL)
                    { 
                        em.TextBody = em.TextBody.replace('\r\n', ' ');
                        em.TextBody = em.TextBody.replace('\n', ' ');
                        em.TextBody = em.TextBody.replace('\r', ' ');
                    }
                    
                    Doc.add(em);
                }
            }
        }
    }
}

//This is the test class

@istest
public class TestExportEmailMessageDataController {
    public Static List<EmailMessage> Doc{get;set;}
	@istest  
    public static void testFuction(){
        test.startTest();
        Doc = new List<EmailMessage>();
        List<EmailMessage> emailList  = new  List<EmailMessage>();
        List<Case> caseList = new List<Case>();
         Case c = new Case();
        c.Subject = 'Om Test';  
        c.Status ='Closed';
        c.Priority = 'Medium';
        c.Origin = 'Email';
        insert c;
        Case c1 = new Case();
        c1.Subject = 'Om Test';  
        c1.Status ='Closed';
        c1.Priority = 'Medium';
        c1.Origin = 'Email';
        insert c1;
        caseList.add(c);
        caseList.add(c1);
  		  
       
        //Insert emailmessage for case
        EmailMessage email = new EmailMessage();
        email.FromAddress = 'test@abc.org';
        email.Incoming = true;
        email.ToAddress= 'test@xyz.org';
        email.Subject = 'Test email';
        email.HtmlBody = 'Test email body';
        email.ParentId = c.Id; 
        email.TextBody = 'test test test';
        email.RelatedToId =c.Id;
        email.CcAddress = 'deepak.potghan@aress.com';
        email.BccAddress = 'deepak.potghan@aress.com';
        email.Status  = '1';
        insert email;
        system.debug('Inserted  email'+email);
    
        
   
        ApexPages.StandardSetController stdSetController = new ApexPages.StandardSetController(caseList);
  		ExportEmailMessageDataController ext = new ExportEmailMessageDataController(stdSetController);
             ExportEmailMessageDataController.getEmailMessage();
        test.stopTest();
    }
}
We have business requirement to display prechat form according to the langauge of User.How we can implement snap-ins for different languages (including for standard and custom field)?
We have business requirement of handling multiple chat buttons in snap-ins according to user's langauge.Chat should  get redirected  to the specific skills.
For example in live agent, we can use:
<input type='text' name='liveagent.prechat:UserEmail' id='email' /><br />
<input type="hidden" name="liveagent.prechat.findorcreate.map:Account" value="Email,UserEmail"/>

So in Snap-ins how this can be achieved?
Hello All,
I have exported all the data from the Professional edition Salesforce Org. However I have all the data from the available objects, but the data of the Salesforce Internal object 'ContentNote' is missing.

As the API is not enabled in this org, I cannot even query it in the Org.

If anyone know hows to export the ContentNote Data from the Salesforce Professional Edition Org, please guide me about it. It is very very important and it needs to be completed today itself.

Thanks in advance..!!

Regards,
Rohan Ravindra Saraf
We have business requirement to display prechat form according to the langauge of User.How we can implement snap-ins for different languages (including for standard and custom field)?
For example in live agent, we can use:
<input type='text' name='liveagent.prechat:UserEmail' id='email' /><br />
<input type="hidden" name="liveagent.prechat.findorcreate.map:Account" value="Email,UserEmail"/>

So in Snap-ins how this can be achieved?