Code Monkey home page Code Monkey logo

Comments (4)

ShadMickelberry avatar ShadMickelberry commented on June 19, 2024

Can you post a sample you are sending? Here is a sample post that seems to be going through just fine.
{ "records": [ { "id": "47fecf72-b195-11e8-a6e1-06cd403c41f6", "first_name": "Test3", "last_name": "Test3", "user_name": "test3", "password": "test123", "email1": "[email protected]" }, { "id": "47fed0f8-b195-11e8-9dde-06cd403c41f6", "first_name": "Test2", "last_name": "Test2", "user_name": "test2", "password": "test123", "email1": "[email protected]" } ] }

In the config_override:
$sugar_config['bulk_import_settings']['modules']['Leads']['sugar_key_field'] = 'id'; $sugar_config['bulk_import_settings']['modules']['Leads']['external_key_field'] = 'id'; // REQUIRED - REST payload variable containing the external system unique key's value $sugar_config['bulk_import_settings']['modules']['Leads']['sql_query'] = 'select id from contacts where id = ?';

from bulkimport.

yuki-consulting avatar yuki-consulting commented on June 19, 2024

Hi there,

Thank you for getting back to me. I have changed my code now so i don't have a sample handy. For me, i have tried the email1 field like you did as well as using an email array similar to example in https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_9.2/Cookbook/Web_Services/REST_API/PHP/How_to_Manipulate_Records_CRUD/#Request_Payload
but neither worked

I ended up changing the code to bulkimport them ass EmailAddresses and then use the relationship to link them.

By the way, it is very interesting that you are using the id as the external key. Does that mean we do not have to create another foreign key?

from bulkimport.

ShadMickelberry avatar ShadMickelberry commented on June 19, 2024

Hello.

That id was just for ease so I didn't have to create a field to test with. Generally, that wouldn't be the case but there is certainly nothing preventing from using that as the external key. If you had an external application creating UUIDs that would work just fine.

I'd investigate if there is some other process interfering with the email population. I have used this quite a bit and not run into that. Are you running into the same issue if you just use the regular create endpoint?

from bulkimport.

yuki-consulting avatar yuki-consulting commented on June 19, 2024

Hello.

I did not have the same problem using the normal endpoint but it is much slower.

from bulkimport.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.