• rahul kumar 215
  • NEWBIE
  • -1 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
public class BannerMessageControllerTxt {
    @AuraEnabled
    public static List<BannerMessage__c> getBannerBasedOnCommunity(String URL)
    {
        String communityName = URL.substringAfter('/').subStringBefore('/');
        List<BannerMessage__c> Bannermsg = BannerMessage__c.getAll().values(); //create instance for text messageList
        List<BannerMessage__c> BmText = new List<BannerMessage__c>();
        
        for(BannerMessage__c queVar:Bannermsg)
        {
            //System.debug('TEST::1::'+queVar.CommunityName__c+'::'+communityName);
             if(communityName!=Null && queVar.CommunityName__c!=NULL && BannerMessage__c.CommunityName__c == communityName)
            {
                BmText.add(quevar);
            }
        }
        return BmText;
    } 

}
Our notes & attchemnet are accessible through files(ie ContentDocumentLink replacement of attachment object), As we can not access/get attachment through lightning experience.
reference: https://help.salesforce.com/apex/HTViewSolution?urlname=Attachments-are-not-returned-in-Lightning-Experience-search&language=en_US
I want to display the attachment(image file) on lightning component, How can I display it?
I tried following code :
<apex:image url="/servlet/servlet.FileDownload—file=06941000000SKtyAAG" width="50" height="50" />  
 <apex:image url="/servlet/servlet.FileDownload?file={!attchmentId}"/>

 
Hi

I am getting this error when i am run my script on CMD
C:\Program Files (x86)\salesforce.com\Data Loader\bin>process.bat "D:\test" Invo
iceUpsert
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: C:\Users\jeffrey.lai\AppData\Local\Temp\sdl.log (
The system cannot find the path specified)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
        at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java
:207)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:3
07)
        at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.ja
va:295)
        at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurat
or.java:176)
        at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfi
gurator.java:191)
        at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOM
Configurator.java:523)
        at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.ja
va:436)
        at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:999)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:867)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:773)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionCon
verter.java:483)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
        at org.apache.log4j.Logger.getLogger(Logger.java:117)
        at com.salesforce.dataloader.process.ProcessRunner.<clinit>(ProcessRunne
r.java:82)
2015-09-02 12:17:14,347 INFO  [main] process.ProcessConfig getBeanFactory (Proce
ssConfig.java:103) - Loading process configuration from config file: D:\test\pro
cess-conf.xml
0 [main] INFO com.salesforce.dataloader.process.ProcessConfig  - Loading process
 configuration from config file: D:\test\process-conf.xml
2015-09-02 12:17:14,482 INFO  [main] xml.XmlBeanDefinitionReader loadBeanDefinit
ions (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from file
 [D:\test\process-conf.xml]
135 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader  -
 Loading XML bean definitions from file [D:\test\process-conf.xml]
2015-09-02 12:17:14,642 INFO  [InvoiceUpsert] controller.Controller initConfig (
Controller.java:365) - The controller config has been initialized
295 [InvoiceUpsert] INFO com.salesforce.dataloader.controller.Controller  - The
controller config has been initialized
2015-09-02 12:17:14,645 INFO  [InvoiceUpsert] process.ProcessRunner run (Process
Runner.java:116) - Initializing process engine
298 [InvoiceUpsert] INFO com.salesforce.dataloader.process.ProcessRunner  - Init
ializing process engine
2015-09-02 12:17:14,647 INFO  [InvoiceUpsert] process.ProcessRunner run (Process
Runner.java:119) - Loading parameters
300 [InvoiceUpsert] INFO com.salesforce.dataloader.process.ProcessRunner  - Load
ing parameters
2015-09-02 12:17:16,961 INFO  [InvoiceUpsert] config.LastRun load (LastRun.java:
96) - Last run info will be saved in file: D:\test\InvoiceUpsert_lastRun.propert
ies
2614 [InvoiceUpsert] INFO com.salesforce.dataloader.config.LastRun  - Last run i
nfo will be saved in file: D:\test\InvoiceUpsert_lastRun.properties
2015-09-02 12:17:16,984 FATAL [main] process.ProcessRunner topLevelError (Proces
sRunner.java:238) - Unable to run process InvoiceUpsert
java.lang.RuntimeException: com.salesforce.dataloader.exception.ProcessInitializ
ationException: Error creating file: D:\InvoiceUpsertSucess.csv
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:162)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: com.salesforce.dataloader.exception.ProcessInitializationException: E
rror creating file: D:\InvoiceUpsertSucess.csv
        at com.salesforce.dataloader.controller.Controller.setStatusFiles(Contro
ller.java:507)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:124)
        ... 2 more
Caused by: java.io.IOException: Error creating file: D:\InvoiceUpsertSucess.csv
        at com.salesforce.dataloader.controller.Controller.validateFile(Controll
er.java:527)
        at com.salesforce.dataloader.controller.Controller.setStatusFiles(Contro
ller.java:504)
        ... 3 more
2637 [main] FATAL com.salesforce.dataloader.process.ProcessRunner  - Unable to r
un process InvoiceUpsert
java.lang.RuntimeException: com.salesforce.dataloader.exception.ProcessInitializ
ationException: Error creating file: D:\InvoiceUpsertSucess.csv
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:162)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: com.salesforce.dataloader.exception.ProcessInitializationException: E
rror creating file: D:\InvoiceUpsertSucess.csv
        at com.salesforce.dataloader.controller.Controller.setStatusFiles(Contro
ller.java:507)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:124)
        ... 2 more
Caused by: java.io.IOException: Error creating file: D:\InvoiceUpsertSucess.csv
        at com.salesforce.dataloader.controller.Controller.validateFile(Controll
er.java:527)
        at com.salesforce.dataloader.controller.Controller.setStatusFiles(Contro
ller.java:504)
        ... 3 more
C:\Program Files (x86)\salesforce.com\Data Loader\bin>
 
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
    
<bean id="InvoiceUpsert" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false" >
  <description>Invoice records gets upserted from csv files into Salesforce.</description> 
  <property name="name" value="InvoiceUpsert" /> 
 <property name="configOverrideMap">
<map>
  <entry key="sfdc.debugMessages" value="false" /> 
  <entry key="sfdc.debugMessagesFile" value="D:\test\invoiceandpaymentSoapTrace.log" /> 
  <entry key="sfdc.endpoint" value="https://login.salesforce.com" /> 
  <entry key="sfdc.username" value="admin@holoflex.com" /> 
  <entry key="sfdc.password" value="a77d74ccc121773bd157905ec94a67f317d7f762942ab5ba1a0a7da15664fd4334ef5e6672df3f37" /> 

  <entry key="process.encryptionKeyFile" value="D:\test\key.txt" /> 
  <entry key="sfdc.timeoutSecs" value="600" /> 
  <entry key="sfdc.loadBatchSize" value="200" /> 
  <entry key="sfdc.entity" value="Invoice_Dispatch_details__c" /> 
  <entry key="sfdc.externalIdField" value="Invoice_Number__c" /> 
  <entry key="process.operation" value="upsert" /> 
  <entry key="sfdc.timeZone" value="GMT+8" /> 
  <entry key="process.mappingFile" value="D:\map\Invoice.sdl" /> 
  <entry key="process.outputError" value="D:\InvoiceUpsertError.csv" /> 
  <entry key="process.outputSuccess" value="D:\InvoiceUpsertSucess.csv" /> 
  <entry key="dataAccess.type" value="csvRead" /> 
  <entry key="dataaccess.writeUTF8" value="true" /> 
  <entry key="dataAccess.name" value="D:\source\TALLY1 Invoice.csv" /> 
  <entry key="process.initialLastRunDate" value="2014-10-06T00:00:00.000-0800" /> 
  </map>
  </property>
  </bean>
<bean id="PaymentUpsert" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false" >
  <description>Payment Records gets upserted from csv files into Salesforce.</description> 
  <property name="name" value="PaymentUpsert" /> 
 <property name="configOverrideMap">
<map>
  <entry key="sfdc.debugMessages" value="false" /> 
  <entry key="sfdc.debugMessagesFile" value="D:\test\PaymentSoapTrace.log" /> 
  <entry key="sfdc.endpoint" value="https://login.salesforce.com" /> 
  <entry key="sfdc.username" value="admin@holoflex.com" /> 
  <entry key="sfdc.password" value="a77d74ccc121773bd157905ec94a67f317d7f762942ab5ba1a0a7da15664fd4334ef5e6672df3f37" /> 
  <entry key="process.encryptionKeyFile" value="D:\test\key.txt" /> 
  <entry key="sfdc.timeoutSecs" value="600" /> 
  <entry key="sfdc.loadBatchSize" value="200" /> 
  <entry key="sfdc.entity" value="Payment_Detail__c" /> 
  <entry key="sfdc.externalIdField" value="Payment_Serial_Number__c" /> 
  <entry key="process.operation" value="upsert" /> 
  <entry key="process.mappingFile" value="D:\map\payment.sdl" /> 
  <entry key="process.outputError" value="D:\PaymentUpsertError.csv" /> 
  <entry key="process.outputSuccess" value="D:\PaymentUpsertSuccess.csv" /> 
  <entry key="dataAccess.type" value="csvRead" /> 
  <entry key="dataaccess.writeUTF8" value="true" /> 
  <entry key="dataAccess.name" value="D:\source\TALLY1 payment details.csv" /> 
  <entry key="process.initialLastRunDate" value="2014-10-06T00:00:00.000-0800" /> 
  </map>
  </property>
  </bean>
  </beans>



 

Hello,

           Can I any one tell how can I get the current temperature of city by entering zip code on visualforce page.

           which web services should i use?

 

 

 

  • January 31, 2012
  • Like
  • 0