• tony2009
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 17
    Replies
I am reading the article https://help.salesforce.com/HTViewHelpDoc?id=sso_provider_sfdc.htm&language=en_US. 

It says "connected app as an authentication provider". I am confused by seting up Auth.provider using connected app's client id and client secret (It is salesforce client Id and client secret). should it be from 3rd party?  for example: linkedin?
 

Hi Guys,

 

I am doing a project related to the multiple timezone.  Currently I am using the salesforce time zone to calculate the local time.

 

for exmaple : 

(GMT+10:00) Australian Eastern Standard Time (Australia/Sydney) (default timezone in our org). 

(GMT+08:00) Australian Western Standard Time (Australia/Perth)

 

If the Sydney time is 11:00 am, it is 9:00 am in Perth.

 

The problem is the daylight saving time.

 

Will the time zone become to  (GMT+11:00) automatically or not ? If not, how do I calculate the local time for Perth?

 

 

 

Thanks in advance

 

 

 

 

Hi Guys,

 

I am doing a time related project.

 

I was wondering if salesforce will use the daylight saving time directly or user need to mofidy it manully?

 

If salesforce does it automaticlly, How do I know it is a daylight saving time now?

 

Will the time zone changed if the daylight saving time apply? for exmple: 

 

(GMT+10:00) Australian Eastern Standard Time (Australia/Sydney)

 

become 

 

(GMT+11:00) Australian Eastern Standard Time (Australia/Sydney)?

 

 

 

Hi Guys,

Is thera any way I can got the site url from Apex Code?

I tried Site.getPrefix() , Site.getDomain() and getCurrentSiteUrl. but all of them return null.

Do I need setup some information after the site is ready.

Thanks in advance.

Hi Guys,

 

Is thera any way I can got the site url from Apex Code?

 

I tried Site.getPrefix() , Site.getDomain() and getCurrentSiteUrl. but all of them return null.

 

Do I need setup some information after the site is ready. 

 

Thanks in advance.

 

 

 

Hi Guys

 

I am developing an apex webservice to explode  the attachment image urls. 

 

How can I get the attachment public urls if the site is ready and attachment parent permission is public.

 

I found some information like:

 

 <img src="{!URLFOR($Action.Attachment.Download, attachmentId)}" />
<a href="{!URLFOR($Action.Attachment.Download, attachmentId)}" >blah blah</a>

 

but APEX web service cannot use visual force page.  how can I get those public urls ?

 

Thanks in advance.

 

 

Hi Guys,

 

For some reason, All my the formula value are null in my APEX test method, but works all right if I manually insert some data from user interface. Is it normal?

 

But I really need some formula value for the query condition of APEX SOQL. 

 

Thanks in advance

 

 

 

 

 

 

 

 

Hi Guys.

 

I am using the data loader command line to copy data from external system to salesforce.

 

I have two objects in salesforce, as well as external system, media and attachement.  media is parent, attachment is child.

 

In the attachment mapping file, the relationship item is 

 

Media__c\:Parent\:ExternalID__c 

 

so that the attachment could  be inserted with the relationship of media. 

 

But I got error message 

 

mapping is invalid: MediaId => Media__c:Parent:Ext
ernalID__c

 

I also tried Parent\:ExternalID__c as well, got similar error message. 

 

Note: I have uploaded the Media data with extenal Id successfully. 

 

How should I specify the mappings?

 

Thanks in advance.

 

 

 

Hi Guys,

 

Is there any way I could upsert the attachment from command line data loader? 

 

My understanding is that extenal id is the key for upserting, but you cannot create a extenal id for attachment. So there is no way to upsert attachment ? Am I right?

 

Thanks in advance 

Tony

 

 

Hi Guys, 

 

I am trying to use data loader command line uploading the csv data. 

 

But everytime I got some error message like:

 

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: C:\Users\jeffrey.lai\AppData\Local\Temp\sdl.log (
Access is denied)
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)

 

From http://files.meetup.com/1589707/Force.com%20Certified%20Developer.pdf, I know this file locate in %TEMP%

 

But my %TEMP% envirenment variable is C:\Users\TonyG\AppData\Local\Temp.

 

 

my config file looks like:

 

<beans>

<bean class="com.salesforce.dataloader.process.ProcessRunner" id="BusinessUnits1"
singleton="false">
<property name="name" value="BusinessUnits1" />
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.debugMessagesFile"
value="C:\Users\TonyG\Desktop\v8\1.log"/>
<entry key="sfdc.endpoint" value="https://login.salesforce.com" />
<entry key="sfdc.username" value="XXXX@XXXX.com" />
<entry key="sfdc.password" value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" />
<entry key="process.encryptionKeyFile" value="C:\Users\TonyG\Desktop\v8\key.txt" />
<entry key="sfdc.timeoutSecs" value="600" />
<entry key="sfdc.loadBatchSize" value="200" />
<entry key="sfdc.entity" value="xpl__BusinessUnit__c" />
<entry key="process.operation" value="upsert" />
<entry key="sfdc.externalIdField" value="xpl__ExternalID__c" />
<entry key="process.mappingFile" value="C:\Users\TonyG\Desktop\v8\mapping\BusinessUnits.sdl" />
<entry key="dataAccess.name" value="C:\Users\TonyG\Desktop\v8\split\BusinessUnits1.csv" />
<entry key="dataAccess.type" value="csvRead" />
<entry key="process.outputSuccess" value="C:\Users\TonyG\Desktop\v8\results\BusinessUnits1_success.csv" />
<entry key="process.outputError" value="C:\Users\TonyG\Desktop\v8\results\BusinessUnits1_error.csv" />
<entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800" />
</map>
</property>
</bean>

</beans>

 

 

The data can be insert into salesforce successfully, but I keep receiving this error message.

 

How can I fix this problem?

  

Thanks in advance.

 

 

Hi Guys,

 

I am trying to use data loader command line to import data from other system to Salesforce for daily synchronization.

 

In old system, the account table come with role table(many-to-one, child-parent relationship). But in salesforce,  it is designed by account object with corresponding record type.

 

According to the data load guide, I can specified the extenal id on the salesforce destination object, then the data could be imported with the relationships between the account and role.

 

But it seems I cannot add new external Id field on the record type object. How can I transfer the account and role from orignal system to salesforce?

 

Since we are still using the old system, the new roles may be inserted into the system. In this case, we cannot manually specify the record type id on the csv file.

 

Any help would be greatly appreciated.

 

 

Hi Guys,

 

I have to upload a self-parent(a object looks up itself) object using data loader.  

 

For example, we have 5 level location information.  Suburb, Area, Regional, State, Country.

 

The CSV file looks like below

 

Id,                                   ParentId            --------------------------- column name

countryId,

StateId,                         countryId

RegionalId,                  StateId

AreaId,                          RegionalId

SuburbId,                     AreaId

 

The number of records in that CSV file is more than 5k. 

I got some errors like "without foreign key" when I upload the csv file with "upsert" operation.(I tried to upload small number of data with batch size one, and it succeeded)

 

I guess that salesforce cannot insert a record and upsert the secord record (based on the first record Id) in same batch process(batch size is 200), In other word, the parent and child records should not be included in the same batch.  But I couldn't split it into 5 different CSV files based on the location type(Suburb, Area, Regional, State, Country). 

 

Is there any way I could work around this issue?

 

Thanks in advance.

Tony

 

 

 

                     

Hi Guys,

 

I am asked to create a APEX web service to query the data in salesforce.com. Is it possible to paginate the query records to 10 or 20 per request?

 

I looked thought the Apex document, it seems that there is no such api, am I right?

 

 

Hi,

 

I got a weired problem about the api call to session. 

 

We use same username and password to login salesforce to do some operations for different cron job . but about every 2 hours, I got the error message ".UnexpectedErrorFault_Exception: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Session timed out".

 

I removed all the logout from my code and did login before do the operations . but still got same problem.

 

I am using WSC 20.0 and partner API,

 

I would be very appreciated if someone can help me 

 

Regards

Tony

 

 

I am reading the article https://help.salesforce.com/HTViewHelpDoc?id=sso_provider_sfdc.htm&language=en_US. 

It says "connected app as an authentication provider". I am confused by seting up Auth.provider using connected app's client id and client secret (It is salesforce client Id and client secret). should it be from 3rd party?  for example: linkedin?
 

Hi Guys,

 

I am doing a time related project.

 

I was wondering if salesforce will use the daylight saving time directly or user need to mofidy it manully?

 

If salesforce does it automaticlly, How do I know it is a daylight saving time now?

 

Will the time zone changed if the daylight saving time apply? for exmple: 

 

(GMT+10:00) Australian Eastern Standard Time (Australia/Sydney)

 

become 

 

(GMT+11:00) Australian Eastern Standard Time (Australia/Sydney)?

 

 

 

Hi Guys,

Is thera any way I can got the site url from Apex Code?

I tried Site.getPrefix() , Site.getDomain() and getCurrentSiteUrl. but all of them return null.

Do I need setup some information after the site is ready.

Thanks in advance.

Hi Guys,

 

Is thera any way I can got the site url from Apex Code?

 

I tried Site.getPrefix() , Site.getDomain() and getCurrentSiteUrl. but all of them return null.

 

Do I need setup some information after the site is ready. 

 

Thanks in advance.

 

 

 

Hi Guys,

 

For some reason, All my the formula value are null in my APEX test method, but works all right if I manually insert some data from user interface. Is it normal?

 

But I really need some formula value for the query condition of APEX SOQL. 

 

Thanks in advance

 

 

 

 

 

 

 

 

Hi Guys, 

 

I am trying to use data loader command line uploading the csv data. 

 

But everytime I got some error message like:

 

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: C:\Users\jeffrey.lai\AppData\Local\Temp\sdl.log (
Access is denied)
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)

 

From http://files.meetup.com/1589707/Force.com%20Certified%20Developer.pdf, I know this file locate in %TEMP%

 

But my %TEMP% envirenment variable is C:\Users\TonyG\AppData\Local\Temp.

 

 

my config file looks like:

 

<beans>

<bean class="com.salesforce.dataloader.process.ProcessRunner" id="BusinessUnits1"
singleton="false">
<property name="name" value="BusinessUnits1" />
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.debugMessagesFile"
value="C:\Users\TonyG\Desktop\v8\1.log"/>
<entry key="sfdc.endpoint" value="https://login.salesforce.com" />
<entry key="sfdc.username" value="XXXX@XXXX.com" />
<entry key="sfdc.password" value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" />
<entry key="process.encryptionKeyFile" value="C:\Users\TonyG\Desktop\v8\key.txt" />
<entry key="sfdc.timeoutSecs" value="600" />
<entry key="sfdc.loadBatchSize" value="200" />
<entry key="sfdc.entity" value="xpl__BusinessUnit__c" />
<entry key="process.operation" value="upsert" />
<entry key="sfdc.externalIdField" value="xpl__ExternalID__c" />
<entry key="process.mappingFile" value="C:\Users\TonyG\Desktop\v8\mapping\BusinessUnits.sdl" />
<entry key="dataAccess.name" value="C:\Users\TonyG\Desktop\v8\split\BusinessUnits1.csv" />
<entry key="dataAccess.type" value="csvRead" />
<entry key="process.outputSuccess" value="C:\Users\TonyG\Desktop\v8\results\BusinessUnits1_success.csv" />
<entry key="process.outputError" value="C:\Users\TonyG\Desktop\v8\results\BusinessUnits1_error.csv" />
<entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800" />
</map>
</property>
</bean>

</beans>

 

 

The data can be insert into salesforce successfully, but I keep receiving this error message.

 

How can I fix this problem?

  

Thanks in advance.

 

 

Hi Guys,

 

I am trying to use data loader command line to import data from other system to Salesforce for daily synchronization.

 

In old system, the account table come with role table(many-to-one, child-parent relationship). But in salesforce,  it is designed by account object with corresponding record type.

 

According to the data load guide, I can specified the extenal id on the salesforce destination object, then the data could be imported with the relationships between the account and role.

 

But it seems I cannot add new external Id field on the record type object. How can I transfer the account and role from orignal system to salesforce?

 

Since we are still using the old system, the new roles may be inserted into the system. In this case, we cannot manually specify the record type id on the csv file.

 

Any help would be greatly appreciated.

 

 

Hi Guys,

 

I am asked to create a APEX web service to query the data in salesforce.com. Is it possible to paginate the query records to 10 or 20 per request?

 

I looked thought the Apex document, it seems that there is no such api, am I right?

 

 

Hi,

 

I want to ask about upload attachment using data loader with schedule. I have mapped Id, ParentId, Name, Body.. If using data loader program, the result is  a success but if using command line prompt or schedule with bat file, there is an error: Field mapping is invalid: Body => Body

 

Is it has different mapping ? Anyway my Body field in csv file contains full path of the file, example: D:\test.jpg

Any suggestions would be great.. thanks..


I login to salesforce.com developer, click Setup, Build, Code and then click Generate from WSDL.  I browse to our wsdl and then get an error.
 
The error I get is "Error: Failed to parse wsdl: Unknown element: import."  Does Apex support .Net 3.0 WCF services?
 
Ryan
  • January 18, 2008
  • Like
  • 0