Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Salesforce - Error Inserting New Opportunity for an Existing Account

  1. #1

    Default Salesforce - Error Inserting New Opportunity for an Existing Account

    Hi All,

    Relative Pentaho/Salesforce newbie here....

    For a pre-sales demo I'm trying to write a job that allows me to raise new opportunities for existing account in SFDC using the SF 'Insert' plugin. I've managed to get this to successfully insert a completely new record without any link to an existing account. However, as soon as I try to link the new opportunity to an existing account I get the following error:

    INVALID FIELD Error Message: The external foreign key reference does not reference a valid entity: Account

    I notice there aren't any examples in the help for the SalesForce insert plugin, in either of two of the 'popular' textbooks and I also couldn't find an obvious tutorial on YouTube! Reading around the subject, does the solution involve using the External ID option in some way?

    Thanks in advance,

    Will

  2. #2
    Join Date
    Aug 2011
    Posts
    236

    Default

    Hi Will,

    Are you sending the 18 char account id along with your opportunity details ? If it's not that, then you need to provide a valid value for the Account field.

    HTH
    PDI 8.0.0
    MySQL - 5.6.27
    Redshift - 1.0.1485
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

  3. #3
    Join Date
    Oct 2014
    Posts
    1

    Default

    Hi Will ,

    Did you get any information/solution about the issue you have mentioned above ? I am trying to solve the same issue with Contact and Account relationship and get the same issue 'INVALID FIELD Error Message: The external foreign key reference does not reference a valid entity: Account' .

    Please let me know if you have any suggestions.

    Thanks
    Sang

  4. #4
    Join Date
    Oct 2010
    Posts
    369

    Default

    when you say mapping what does it mean?
    as "tnewman" stated you need to have AccoingId to map your existing account.
    As accountid is autogenerated by SF so you need to specify mapped accontid manually.
    In perspective of SF insertion:-
    if you wanted to check for the existing accounts use lookup with your SF step.
    if you wanted to update some information in SF use SF upsert which will do insert/update on ur data

  5. #5
    Join Date
    Apr 2014
    Posts
    14

    Default

    Hi Will,

    Are you using the write ID field, all salesforce IDs are composed of two parts, 3 bit object suffix and 15 bit auto generated alphanumeric SFDC id,
    in the case of account IDs you should have your IDs like: " 001*************** " where "001" is the account table suffix.
    Before inserting your records make sure that these account IDs had not changed in the Account object in SFDC, where salesforce will lookup your provided Account IDs for each inserted record in Opportunity object.

    with regards,
    Rahul Trivedi

  6. #6
    Join Date
    Jun 2016
    Posts
    1

    Default

    Hi All,


    I got this error also when I tried to insert Contacts to Salesforce. I solved it by simply renaming the Module field from Account to AccountId, for the mapping of AccountId on Contacts.

    HTH
    Anders

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.