• Ross Neill
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I'm trying to build a formula (boolean) that's checked "TRUE" if the Close Date on the record was for LAST WEEK. 
Hello,
I am trying to upsert records from pentaho onto salesforce.
My record types are  : 'Company','Unit or Departments'

When i am trying to upsert the records, it gives me the following error :


2014/07/15 12:38:34 - Salesforce Upsert.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : Unexpected error
2014/07/15 12:38:34 - Salesforce Upsert.0 - ERROR (version 5.0.1-stable, build 1 from 2013-11-15_16-08-58 by buildguy) : org.pentaho.di.core.exception.KettleStepException:
2014/07/15 12:38:34 - Salesforce Upsert.0 - Error while writing data to Salesforce :
2014/07/15 12:38:34 - Salesforce Upsert.0 -
2014/07/15 12:38:34 - Salesforce Upsert.0 - :Errors were found on item 0 Error code is: INVALID_FIELD Error message: The external foreign key reference does not reference a valid entity: RecordType
2014/07/15 12:38:34 - Salesforce Upsert.0 -
2014/07/15 12:38:34 - Salesforce Upsert.0 -
2014/07/15 12:38:34 - Salesforce Upsert.0 -  at org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsert.processRow(SalesforceUpsert.java:123)
2014/07/15 12:38:34 - Salesforce Upsert.0 -  at org.pentaho.di.trans.step.RunThread.run(RunThread.java:60)
2014/07/15 12:38:34 - Salesforce Upsert.0 -  at java.lang.Thread.run(Thread.java:744)
2014/07/15 12:38:34 - Salesforce Upsert.0 - Caused by: org.pentaho.di.core.exception.KettleException:
2014/07/15 12:38:34 - Salesforce Upsert.0 - :Errors were found on item 0 Error code is: INVALID_FIELD Error message: The external foreign key reference does not reference a valid entity: RecordType
2014/07/15 12:38:34 - Salesforce Upsert.0 -
2014/07/15 12:38:34 - Salesforce Upsert.0 -  at org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsert.flushBuffers(SalesforceUpsert.java:225)
2014/07/15 12:38:34 - Salesforce Upsert.0 -  at org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsert.writeToSalesForce(SalesforceUpsert.java:172)
2014/07/15 12:38:34 - Salesforce Upsert.0 -  at org.pentaho.di.trans.steps.salesforceupsert.SalesforceUpsert.processRow(SalesforceUpsert.java:119)


My query :

select
sp.SPONSOR_CODE as sponsor_id,
sp.SPONSOR_NAME as sponsor_name,
spt.DESCRIPTION as sponsor_type,
'Sponsor' as company_type,
'Company' as account_record_type,
case when sp.state is null THEN ' ' else replace(sp.state,',','') end as state,
case when sp.COUNTRY_CODE = 'XXX' THEN ' ' else replace(sp.COUNTRY_CODE,',','') end as country
from
coeus.osp$sponsor sp,
coeus.osp$sponsor_type spt,
coeus.osp$sponsor_hierarchy sph
where sp.sponsor_type_code = spt.SPONSOR_TYPE_CODE
and sph.SPONSOR_CODE = sp.sponsor_code
and sph.HIERARCHY_NAME = 'IAO Sponsors'
order by sponsor_name

Please help me in figuring this out, its urgent.