• Shaun A
  • NEWBIE
  • 0 Points
  • Member since 2012

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

I want to append the extension of document like .doc,.docx,.ppt etc based on the content type.For this I want to use custom setting that maintains all content type value with extension(Custom setting > Two fields > 1.content type of document 2.Extension) so that based on contnent type I can add the extension at time of sending email with attachement :

Snippet of code :
for (Attachment attachDoc : [select Name, Body, ContentType
                                        from Attachment
                                       where Id in :attachmentIds])
            {
                Messaging.EmailFileAttachment Email= new Messaging.EmailFileAttachment();
/* IF content type from Custom setting == Content Type Of Attachment
    Name of Attachment would be appneded with Custom Setting Extension Value,
*/

              
                Email.setFileName(attach.Name);
                Email.setBody(attach.Body);
                Email.setContentType(attach.ContentType);  
                AttachmentList.add(Email) ;
            }

            mail.setFileAttachments(AttachmentList) ;

public Object__c incSearch = new Object__c ();

 

Result  = filed__c from Object__c where Status__c =: incSearch.Status__c OR Incident__c like :incSearch.Incident_No_for_Search__c+'%' OR Applies_To__c=:incSearch.Applies_To__c OR Responsible__c = :incSearch.Responsible__c];

 

Please explain the above code and what is use of '%' here ??

 

Thanksin advance!!

Hi,

 

 

I'm new to salesforce integration ,can any one please help me to understand the integration terminology.

Like :

* What is SOAP API and when this have to be used.

* What is REST API and when this have to be used.

* How to integrate salesforce with any other system.

 

Any help would be really appreciable here.

 

Thanks,

Rohit

public Object__c incSearch = new Object__c ();

 

Result  = filed__c from Object__c where Status__c =: incSearch.Status__c OR Incident__c like :incSearch.Incident_No_for_Search__c+'%' OR Applies_To__c=:incSearch.Applies_To__c OR Responsible__c = :incSearch.Responsible__c];

 

Please explain the above code and what is use of '%' here ??

 

Thanksin advance!!

Hi,

 

 

I'm new to salesforce integration ,can any one please help me to understand the integration terminology.

Like :

* What is SOAP API and when this have to be used.

* What is REST API and when this have to be used.

* How to integrate salesforce with any other system.

 

Any help would be really appreciable here.

 

Thanks,

Rohit