• Ahmad Amiri 15
  • NEWBIE
  • 10 Points
  • Member since 2015

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

Can anyone help me with some sample code to integrate Salesforce with App script execution API or Google doc use Apex class.
I need open Google doc and merg some Salesforce data to document and then save on Google drive from Salesforce.

BR
Ahmad
Hi,

I have a vf page form that has an inputfile tag for uploading a file, and I use commandButton with status and reRender to show  progress text while file loading and then display file's content.
It's working without rerender but when does not show waiting text and when I added <apex:actionRegion>  to my code doesnot pass parametesrs to apex class.

How can I have progress text with inputfile and commandButton to dislpay info from file at same page?

Thank you.

/Ahmad

below is my vf code snippet

<apex:commandButton value="Save" action="{!ReadFile}" status="theStatus" reRender="testblock"/>
        </apex:actionRegion>
     <apex:actionStatus id="theStatus">
                <apex:facet name="start">
                    <apex:outputPanel >
                        
                        Please wait...
                    </apex:outputPanel>
                </apex:facet>
    </apex:actionStatus>
      <apex:pageBlock id="testblock">
          <apex:pageBlockSection title="My Content Section" columns="2">   
           <apex:outputText >Namn:</apex:outputText>
                <apex:outputLabel value="{!nameFile}"/>
                   <apex:outputText >Namn1:</apex:outputText>
                <apex:outputLabel value="{!nameFile1}"/>
              <apex:outputText >Namn2:</apex:outputText>
                <apex:outputLabel value="{!nameFile2}"/>
            </apex:pageBlockSection>  

Apex:

 public void ReadFile()
    {
        
        if(nameFile == null)
            nameFile2 = 'File name is null ';
        else
            nameFile2 = 'Yohoooo ' + nameFile;
        
        if(contentFile == null)
            nameFile1 = ' content is null ';
        else
            nameFile1 = ' Yohoooo';
Hi,

I have a vf page form that has an inputfile tag for uploading a file, and I use commandButton with status and reRender to show  progress text while file loading and then display file's content.
It's working without rerender but when does not show waiting text and when I added <apex:actionRegion>  to my code doesnot pass parametesrs to apex class.

How can I have progress text with inputfile and commandButton to dislpay info from file at same page?

Thank you.

/Ahmad

below is my vf code snippet

<apex:commandButton value="Save" action="{!ReadFile}" status="theStatus" reRender="testblock"/>
        </apex:actionRegion>
     <apex:actionStatus id="theStatus">
                <apex:facet name="start">
                    <apex:outputPanel >
                        
                        Please wait...
                    </apex:outputPanel>
                </apex:facet>
    </apex:actionStatus>
      <apex:pageBlock id="testblock">
          <apex:pageBlockSection title="My Content Section" columns="2">   
           <apex:outputText >Namn:</apex:outputText>
                <apex:outputLabel value="{!nameFile}"/>
                   <apex:outputText >Namn1:</apex:outputText>
                <apex:outputLabel value="{!nameFile1}"/>
              <apex:outputText >Namn2:</apex:outputText>
                <apex:outputLabel value="{!nameFile2}"/>
            </apex:pageBlockSection>  

Apex:

 public void ReadFile()
    {
        
        if(nameFile == null)
            nameFile2 = 'File name is null ';
        else
            nameFile2 = 'Yohoooo ' + nameFile;
        
        if(contentFile == null)
            nameFile1 = ' content is null ';
        else
            nameFile1 = ' Yohoooo';