• Retreever
  • NEWBIE
  • 30 Points
  • Member since 2015
  • Founder / CEO
  • Retreever Consulting


  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 4
    Replies
We are trying to switch from Notes and Attachments to Salesforce Files but have run into an issue with file attachments being loaded from a web form.
Currently a person can populate the form fields, attach a file and click the submit button on the web page - this in turn creates (2) custom objects and attaches the file to one of the custom objects under the Notes and Attachments related list - this has been working for more than a year.
I have completed all of the necessary tasks in our Salesforce Sandbox to switch to files and I have a test web site connected to the sandbox org to test the form submissions. Everything comes through as described above BUT there is no "file" in the "Files" related list on the new record. I am assuming I need to change the coeding on the website but neither my web site developer or I have a clue as to what needs to change.
See below the coding which currently handles the file attachment from the web site form any help or suggestions would be greatly appreciated.
 
// CV attachment object
    $jobAttachment = null;
    $candidateAttachment = null;
    if ($cv['tmp_name']) {
        $jobAttachment = new stdClass();
        $candidateAttachment = new stdClass();

        $jobAttachment->Name = $candidateAttachment->Name = $cv['name'];
        $jobAttachment->ContentType = $candidateAttachment->ContentType = $cv['type'];
        $fileContent = base64_encode(file_get_contents($cv['tmp_name']));
        $jobAttachment->Body = $candidateAttachment->Body = $fileContent;
    }

 
I have a form on a web site using the SOAP API to connect to Salesforce which includes a document attachment function - when the form is submitted it creates records for (2) custom objects and attaches the submitted document to the Notes and Attachments related list on one of the custom objects - this has been working for over a year.

We recently decided to migrate to the new Salesforce Files which I have done in our Sandbox as a prelude to production release. Everything appears to be working fine EXCEPT the documents attached to the web form are NOT appearing in the Files related list.

Is there something I need to do with my web form or in Salesforce to make this work as expected?

TIA, Roger
The sales team wants to send emails to all Contact Roles from the Opportunity when the Opportunity is editted to meet specified criteria.

Standard Workflow/Email alerts won't work but I thought I had found a solution. I have built a Process Builder Flow that will trigger a Visual Flow.

I've built the Visual Flow using a Fast LookUp to pass the OpportunityID and a Loop to collect the Contact Role records including the ContactId.

I am assuming the next step is to capture the email addresses and use them to send the specified email template BUT I am lost as to how to do this.

I have been working on this of and on all this week and I would really like to figure it out. Any help would be greatly appreciated. I am attaching screenshots of my flow in case that helps.

Thanks in Advance, Roger

Contact Role Email Flow_Fast Lookup
Contact Role Emal Addresses Flow_Loop_Element2
User-added image
And the phone number does not format properly when the new Account Record is created - why is that?
Thanks, Roger
User-added image
I created the sample flow from "Collect Information from Users and then Operate on It with Visual Workflow" exercise , just (2) fields, Account (Text) and Phone (Number). The flow works and will create a new Account record but the phone number format is wrong ( see screen cap attached). Is there a way to fix this?
User-added image
I am working on a Salesforce implementaion for a NonProfit , they operate a Community based Loan Fund. Part of their work is providing training programs. I have built out custom objects to faciliate this and they are happy with that however one of the objects is an individual registration record ( see attached screen cap) - they are asking if it's possible to add something like the "Convert" button found on the standard Lead object to create an Account/Contact record from the detail on this custom object.
I believe this should be possible but have no idea of what would be required. Would anyone have any suggestions or sample coding of how this would be done?

Thanks in Advance
RogerUser-added image
Ok, so I successfully got a VF Page Form to show on my Force.com site , anyone can go to the URL and see the form , even fill it in BUT when you hit "Save" you get the following error message: "Authorization Required-You must first log in or register before accessing this page.If you have forgotten your password, click Forgot Password to reset it."

I have confirmed the guest user permissions are set properly on the Custom Object and in the OWD settings , I have been researching , reading and watching videos for the last week but I have been unable to determine what the problem is. Attached is the code for the VF page.

I think it's something to do with using "standardController" maybe I need a custom controller to make this work - anyone have any suggestions?
<apex:page standardController="Loyalty_Program_Member__c">
<apex:messages />
    <apex:form id="changeStatusForm">
        <apex:pageBlock >
          <apex:pageblocksection title="Loyalty Program Member Detail">
               <apex:inputfield value="{!Loyalty_Program_Member__c.First_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Last_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Full_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Street_Address__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.City__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Province_State__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Country__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Postal_Zip__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Home_Phone__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Mobile__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Email__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Type_of_Pet__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Product_Purchased__c}"/>
        </apex:pageblocksection>
        <apex:pageblocksection title="Retailer Information">
             <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Name__c}"/>
             <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Street__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_City__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_State_Province__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Country__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Postal_Zip__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Phone__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Fax__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Email__c}"/>
        </apex:pageblocksection>
        <apex:pageBlockButtons >
             <apex:commandButton value="Save" action="{!save}"/>
        </apex:pageBlockButtons>
       </apex:pageBlock>
    </apex:form>
</apex:page>

Thanks, Roger
So I am starting to work with VF pages. My first goal is to have a VF form that would allow me to create new records in a custom object either from inside Salesforce or from a outside webpage using sites. With some help I have been able to create the form (see attached code and screen cap). But when I populate the form and hit save it doesn't seem to do anything, so I guess I've missed something or there's something wrong with my code. I would appreciate any suggestions and how to fix this.
 
<apex:page standardController="Loyalty_Program_Member__c">
    <apex:form id="changeStatusForm">
        <apex:pageBlock >
          <apex:pageblocksection title="Loyalty Program Member Detail">
               <apex:inputfield value="{!Loyalty_Program_Member__c.First_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Last_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Full_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Street_Address__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.City__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Province_State__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Country__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Postal_Zip__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Home_Phone__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Mobile__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Email__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Type_of_Pet__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Product_Purchased__c}"/>
        </apex:pageblocksection>
        <apex:pageblocksection title="Retailer Information">
             <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Name__c}"/>
             <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Street__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_City__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_State_Province__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Country__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Postal_Zip__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Phone__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Fax__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Email__c}"/>
        </apex:pageblocksection>
        <apex:pageBlockButtons >
             <apex:commandButton value="Save" action="{!save}"/>
        </apex:pageBlockButtons>
       </apex:pageBlock>
    </apex:form>
</apex:page>
User-added image
 
I have (2) objects, Client (Master) and Purchases (Detail). I want to build a workflow that will trigger a Thank You email to the Client when they make a new Purchase. The challenge is the email address is on the Client object while the Purchase record is what would trigger the workflow, I was able to create a formula field on the Purchase object to copy the email address from the Client object to the Purchase object but the Workflow tool won't recognize it as a "Email" field. Would anyone have any suggestions?
I created the sample flow from "Collect Information from Users and then Operate on It with Visual Workflow" exercise , just (2) fields, Account (Text) and Phone (Number). The flow works and will create a new Account record but the phone number format is wrong ( see screen cap attached). Is there a way to fix this?
User-added image
I created the sample flow from "Collect Information from Users and then Operate on It with Visual Workflow" exercise , just (2) fields, Account (Text) and Phone (Number). The flow works and will create a new Account record but the phone number format is wrong ( see screen cap attached). Is there a way to fix this?
User-added image
So I am starting to work with VF pages. My first goal is to have a VF form that would allow me to create new records in a custom object either from inside Salesforce or from a outside webpage using sites. With some help I have been able to create the form (see attached code and screen cap). But when I populate the form and hit save it doesn't seem to do anything, so I guess I've missed something or there's something wrong with my code. I would appreciate any suggestions and how to fix this.
 
<apex:page standardController="Loyalty_Program_Member__c">
    <apex:form id="changeStatusForm">
        <apex:pageBlock >
          <apex:pageblocksection title="Loyalty Program Member Detail">
               <apex:inputfield value="{!Loyalty_Program_Member__c.First_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Last_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Full_Name__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Street_Address__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.City__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Province_State__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Country__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Postal_Zip__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Home_Phone__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Mobile__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Email__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Type_of_Pet__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Product_Purchased__c}"/>
        </apex:pageblocksection>
        <apex:pageblocksection title="Retailer Information">
             <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Name__c}"/>
             <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Street__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_City__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_State_Province__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Country__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Address_Postal_Zip__c}"/>
        <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Phone__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Fax__c}"/>
               <apex:inputfield value="{!Loyalty_Program_Member__c.Retailer_Email__c}"/>
        </apex:pageblocksection>
        <apex:pageBlockButtons >
             <apex:commandButton value="Save" action="{!save}"/>
        </apex:pageBlockButtons>
       </apex:pageBlock>
    </apex:form>
</apex:page>
User-added image
 
I have (2) objects, Client (Master) and Purchases (Detail). I want to build a workflow that will trigger a Thank You email to the Client when they make a new Purchase. The challenge is the email address is on the Client object while the Purchase record is what would trigger the workflow, I was able to create a formula field on the Purchase object to copy the email address from the Client object to the Purchase object but the Workflow tool won't recognize it as a "Email" field. Would anyone have any suggestions?