Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8692491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:19:18+00:00 2026-06-13T00:19:18+00:00

Im working with ZKSForce library to upload data to CLOUD database. In salesforce ,

  • 0

Im working with ZKSForce library to upload data to CLOUD database.

In salesforce , there is an option to upload both parent and child table in single call.
salesforce – create

Does, this feature allowed in ZkSForce. How to pass the child object reference to parent table.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:19:19+00:00Added an answer on June 13, 2026 at 12:19 am

    Yes, create in ZKSforce works exactly the same way as the underlying SOAP API, you pass in an array of ZKSObjects that you want to create.

    // pass an array of ZKSObject's to create in salesforce, returns a matching array of ZKSaveResults
    - (NSArray *)create:(NSArray *)objects;
    

    As the docs you linked to mention if you want to create records that are related to each other, then the parent record(s) will need to have an external Id field declared for it, and your child records will need to use that to declare the parent, e.g. If you want to insert an account with a related contact, and have an accMaster__c field on account that is an externalId, you’d do.

    ZKSObject *acc = [[ZKSObject alloc] initWithType:@"Account"];
    [acc setFieldValue:@"New Account" field:@"Name"];
    [acc setFieldValue:@"ACC_1234" field:@"accMaster__C"];
    
    ZKSObject *contact = [[ZKSObject alloc] initWithType:@"Contact"];
    [contact setFieldValue:@"Simon" field:@"FirstName"];
    [contact setFieldValue:@"Fell" field:@"LastName"];
    
    // per the externalId docs, create a account structure that just contains the externalId value we want to resolve the account relationship for
    ZKSObject *accRel = [[ZKSObject alloc] initWithType:@"Account"];
    [accRel setFieldValue:@"ACC_1234" field:@"accMaster__C"];
    [contact setFieldValue:accRel field:@"Account"];
    
    NSArray *res = [sforce create:[NSArray arrayWithObjects:acc, contact, nil]];
    NSLog(@"results are %@", res);
    

    After running this and opening the new contact record in the browser, you can see that it set the parent account relationship to be the new account record we just created.

    enter image description here

    If you don’t have a natural externalId field on your parent records, then one thing you can do is create one and use GUIDs from the client as the externalId value for your newly inserted records, this’ll let you related the records together in you create call without having to have some external system maintain the externalIds->salesforce mappings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working with JSF 2.0 (and Primefaces), is there a way to fire an ActionListener
Working with a data frame similar to this: set.seed(100) df <- data.frame(cat = c(rep("aaa",
Working with wxFormBuilder under windows 7, Is there any way to set my main
Working sample using one Table SELECT t.* FROM ( SELECT TITLE.name, (TITLE.value-TITLE.msp) AS Lower,
Working example: http://alpha.jsfiddle.net/gTpWv/ Both of the methods work separately, but once regexp for smilies
Working in Scala-IDE, I have a Java library, in which one of the methods
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I m working on iOS integration with SalesForce. I stuck in following points. I
Working on a legacy application at the moment and we are replacing the data
Working on a small game using an HTML5 canvas, and javascript. And it's working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.