• Denis Brown
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 5
    Replies
Hi guys,

We want to use a Flow in our Community portal.

I created a flow, activated it, embeded into VF page, created a Tab for that page and in Portal settings switched the Tab to right, thus now the Tab is available on Portal Home layout (and made that VFP be available for Site, just in case).

And when I am in the Portal (under Admin profile), I can click on that Tab and see very first screen of my Flow and can hit 'Next' button. After that, insteed of second screen (or first screen again if didnt pick a required field) I see "Error: Error occurred while loading a Visualforce page"  :(

But within an Org those Tab, VFP and Flow work well.

Not sure what to do...

Thanks
Hi!

I want my Salesforce1 App uses another Android App seamlessly. It is easy if we have access to App code, but with Salesforce1 we have not.

So, can I call another Android App by startActivityForResult from HTML5 (JS) and get a result back?

Thank you a lot for any piece of advice.
Hi everybody!

First at all: Happy New Year to you and your family. I wish you all the best in new 2014 year.

And about my case:

I use 'MyPdfRenderingPage.getContent();' method to get Blob PDF-body, create PDF attachment and sent it by mail.

And a code (please see below) works great in  Console's Execute Anonimous Window. It creates a mail with PDF file attached which I can open later.

But if I insert the same piece of code in my Email service (it receives a mail, creates a record and returns new mail with PDF attachment), it doesn't work correctly. I receive the mail, but can't open PDF attachment.

So I checked what does that Blob return content? If to execute 'MyPdfRenderingPage.getContent();' method in Email service, it returns HTML file with JS script inside leads to MyPdfRenderingPage.

In both cases the code runs by the same user, i did check it as well.

I have no idea what is wrong here...

Thanks a lot for your help.

----------
And that code below
______

Messaging.reserveSingleEmailCapacity(5);

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

String[] toAddresses = new String[] {'my@mail.com'};

mail.setToAddresses(toAddresses);

mail.setReplyTo('my@mail.com');

mail.setSenderDisplayName('Support');

mail.setSubject('New Record Created : ' + newRecords[0].id);

mail.setBccSender(true);

mail.setUseSignature(false);

mail.setPlainTextBody('Your new record has been created.');

mail.setHtmlBody('Your new record has been created.');


    PageReference pdf = Page.MyPDFpage;
    pdf.getParameters().put('id', (String)newRecords[0].id);
    pdf.getParameters().put('position', '1');
    pdf.setRedirect(true);

    Blob pageContent = pdf.getContent();

    Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
    efa.setFileName('PrintThisPDF.pdf');
    efa.setBody(pageContent);                                                          

mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});                                                         
                                                          
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
Hi!

I want my Salesforce1 App uses another Android App seamlessly. It is easy if we have access to App code, but with Salesforce1 we have not.

So, can I call another Android App by startActivityForResult from HTML5 (JS) and get a result back?

Thank you a lot for any piece of advice.
Hi guys,

We want to use a Flow in our Community portal.

I created a flow, activated it, embeded into VF page, created a Tab for that page and in Portal settings switched the Tab to right, thus now the Tab is available on Portal Home layout (and made that VFP be available for Site, just in case).

And when I am in the Portal (under Admin profile), I can click on that Tab and see very first screen of my Flow and can hit 'Next' button. After that, insteed of second screen (or first screen again if didnt pick a required field) I see "Error: Error occurred while loading a Visualforce page"  :(

But within an Org those Tab, VFP and Flow work well.

Not sure what to do...

Thanks
Hi everybody!

First at all: Happy New Year to you and your family. I wish you all the best in new 2014 year.

And about my case:

I use 'MyPdfRenderingPage.getContent();' method to get Blob PDF-body, create PDF attachment and sent it by mail.

And a code (please see below) works great in  Console's Execute Anonimous Window. It creates a mail with PDF file attached which I can open later.

But if I insert the same piece of code in my Email service (it receives a mail, creates a record and returns new mail with PDF attachment), it doesn't work correctly. I receive the mail, but can't open PDF attachment.

So I checked what does that Blob return content? If to execute 'MyPdfRenderingPage.getContent();' method in Email service, it returns HTML file with JS script inside leads to MyPdfRenderingPage.

In both cases the code runs by the same user, i did check it as well.

I have no idea what is wrong here...

Thanks a lot for your help.

----------
And that code below
______

Messaging.reserveSingleEmailCapacity(5);

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

String[] toAddresses = new String[] {'my@mail.com'};

mail.setToAddresses(toAddresses);

mail.setReplyTo('my@mail.com');

mail.setSenderDisplayName('Support');

mail.setSubject('New Record Created : ' + newRecords[0].id);

mail.setBccSender(true);

mail.setUseSignature(false);

mail.setPlainTextBody('Your new record has been created.');

mail.setHtmlBody('Your new record has been created.');


    PageReference pdf = Page.MyPDFpage;
    pdf.getParameters().put('id', (String)newRecords[0].id);
    pdf.getParameters().put('position', '1');
    pdf.setRedirect(true);

    Blob pageContent = pdf.getContent();

    Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
    efa.setFileName('PrintThisPDF.pdf');
    efa.setBody(pageContent);                                                          

mail.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});                                                         
                                                          
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
I'm building a mobile app with Salesforce1 and would like to call the Camera. How is this achievable?

With PhoneGap/Cordova I have a nice set of APIs to work with.

Does Salesforce1 inherit Phonegap functionality?