• Vivek C 1
  • NEWBIE
  • 80 Points
  • Member since 2015

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 12
    Replies
Hi I have created an e-mail alert using work-flow which sends the email as soon as the condition is satisfied, But I have to change the from address through which e-mail has been sent
We are using forcetk REST API for uploading files to contentVersion in salesforce. Everything works fine uplaoding and downloading files from and to contentVersion. But we are facing some issues while opening only on docx and xlsx files, for doc and xl files its works fine. While opening it some error messages are throwing and only after clicking on those popup boxes we are able to view the files.

Any possible solutions for our issues are highly appretiated !

If any additional requirements is needed please let me know.

Thanks in advance !
Hi I have created an e-mail alert using work-flow which sends the email as soon as the condition is satisfied, But I have to change the from address through which e-mail has been sent
I have 2 objects product(parent object) and price(child object) and the  relationship is lookup .
I have a field amount in child object and i want  the sum of  amont field  like Roll-up summery field.
How can i get this.
trigger Oldtrigger on Contact (before update,after insert) {
for (Contact account : Trigger.new) {
Contact oldAccount = Trigger.oldMap.get(account.ID);
system.debug('#####'+oldAccount);
}
}
How is it working and where I can see the output.
Hi,

Can anyone please help me out from this issue in Trailhead challenges.
I am unable to create a Button. I have attached the steps below how I have proceeded.

Step1: I have created a Google Info button. Attached screenshot below.
User-added image


Step2: Created layout

User-added image

Step: Layout view

User-added image

step4: Error showing

User-added image
Hi Dev's

trigger onecontactforoneaccount on Contact (before insert,before update) {

    if(Trigger.isInsert || Trigger.isUpdate){
        for(Contact con : Trigger.New){
            for(Contact c : [Select id,accountid from contact]){
                if(con.accountid == c.accountid && con.accountid != Trigger.oldmap.get(con.id).accountid){
                    Trigger.oldmap.get(con.id).addError('Duplicate account id');
                }
        }
        }
    }
}


Regards
Lakshmi

Hi,

 

I am trying to download attachments from Salesforce to upload it to Sharepoint. The issue I am facing is that, the download works fine with attachments like .txt file etc, but for Word or Excel documents gives an error when trying to open the document "the document cannot be opened because there are problems with the contents". 

 

I am doing this via c# REST api. 

 

//example of word doc retrieval
string bodyData = HttpGet(token.instance_url + "/services/data/v28.0/sobjects/Attachment/00Pi0000001UMXa/Body", "");
byte[] encData_byte = System.Text.Encoding.UTF8.GetBytes(bodyData);
File.WriteAllBytes(@"c:\yourfile.docx", encData_byte);

 

From SF documents I understood that the string returned by querying the attachment is Base64Encoded. So in the code you need to ConvertFromBase64. But when I tried to convert the string using Convert.ToBase64String, it always gave an error saying "System.FormatException : Invalid character"

 

Have anyone faced something similar?

 

Cheers,

Ashwin