Insert/Query records of custom objects

We are looking for a generic programmatic solution to query/insert/delete records of custom objects. Using different WSDLs for custom objects and making calls to APIs of multiple stubs is NOT a generic solution. The main purpose of generic solution is – least bother about the number of custom objects present in any OCOD instance and their WSDLs. I am a bit ready to take minor hit on performance and others.
Any suggestion? Idea?

We are looking for a generic programmatic solution to query/insert/delete records of custom objects. Using different WSDLs for custom objects and making calls to APIs of multiple stubs is NOT a generic solution. The main purpose of generic solution is – least bother about the number of custom objects present in any OCOD instance and their WSDLs. I am a bit ready to take minor hit on performance and others.
Any suggestion? Idea?

Similar Messages

  • Data Loader On Demand Inserting Causes Duplicates on Custom Objects

    Hi all,
    I am having a problem that i need to import around 250,00 records on a regular basis so have built a solution using Dataloader with two processes, one to insert and one to update. I was expecting that imports that had an existing EUI would fail therefore only new records would get inserted (as it says in the PDF) but it keeps creating duplicates even when all the data is exactly the same.
    does anyone have any ideas?
    Cheers
    Mark

    Yes, you have encountered an interesting problem. There is a field on every object labelled "External Unique Id" (but it is inconsistent as to whether there is a unique index there or not). Some of the objects have keys that are unique and some that seemingly have none. The best way to test this is to use the command line bulk loader (because the GUI import wizard can do both INSERT/UPDATE in one execution, you don't always see the problem).
    I can run the same data over and over thru the command line loader with the option to INSERT and you don't get unique key constraints. For example, ASSET and CONTACT, and CUSTOM OBJECTS. Once you have verified whether the bulk loader is creating duplicates or not, that might drive you to the decision of using a webservice.
    The FINANCIAL TRANSACTION object I believe has a unique index on the "External Unique Id" field and the FINANCIAL ACCOUNT object has a unique key on the "Name" field I believe.
    Hope this helps a bit.
    Mychal Manie ([email protected])
    Hitachi Consulting

  • Import records to custom object 2

    Hi expert,
    Are we able to import records to the custom objects?
    For some reason, the import record type does not have custom object 2 for selction. Is it a system bug?
    Thanks, Sab.

    Sab, make sure you have access to custom object 2 in your role and access profiles.

  • Custom Oaf form inserting blank records into custom table

    Hi all,
    I have developed custom OAF form to insert vendor details mapped to custom table.
    Oaf form is working fine without giving any error.
    In back end blank records is inserting into the custom table i.e. only WHO columns (creation_Date, created_by, last_update_login etc.) values are populating correctly but the
    data which i am entering in OAF form is not populating into the table.
    Please help, tnx in advance.
    Regards,
    Mohit

    Do you have mapping of your form fields with the view object and view attribute ?

  • Query List of Custom Objects

    I'm unable to find a concrete answer on how to query an Object when it is contained within a List. Perhaps it's in the documentation or forums, but I haven't found it. What I have is a Building Object that contains a List<Room> rooms, and each Room has its own attributes like typeCode. Our cache contains Building Objects indexed by its own key. Now I want to write a Filter to locate 1 to many Building Objects that have a Room with a specific typeCode, say "2DB".
    I've tried an EqualsFilter with "2DB" and passing it a ValueExtractor that navigates the Building like: rooms.typeCode. I expect the Building getRooms() method to be called, which returns a List<Room>, and then reflection to evaluate the List contents to call getTypeCode() on each Room instance. Instead, I see errors because getTypeCode() doesn't exist on java.util.ArrayList. No kidding.
    How do I get the framework to dive inside the List and evaluate the Room instances inside it? All examples I've seen are for simple collections, like List<String> or List<Integer>, whereas I have a List<FooBar>.

    Hi,
    you would need to write a custom extractor to achieve this as the out-of-the-box extractors don't support invocation chaining across collections (i.e. extracting a collection created by extracting attributes from collection elements).
    something like this:
    import java.io.IOException;
    import java.lang.reflect.Array;
    import java.util.ArrayList;
    import java.util.Collection;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.io.pof.PortableObject;
    import com.tangosol.util.ValueExtractor;
    public class TwoLevelChainExtractor implements ValueExtractor, PortableObject {
       private ValueExtractor extractorReturningCollection;
       private ValueExtractor extractorExtractingFromCollectionElement;
        * This is for the POF deserialization.
       public TwoLevelChainExtractor() {
       public TwoLevelChainExtractor(ValueExtractor extractorReturningCollection, ValueExtractor extractorExtractingFromCollectionElement) {
          this.extractorReturningCollection = extractorReturningCollection;
          this.extractorExtractingFromCollectionElement = extractorExtractingFromCollectionElement;
       @Override
       public Object extract(Object obj) {
          Object interim = extractorReturningCollection.extract(obj);
          Collection res = new ArrayList();
          ValueExtractor innerExtractor = extractorExtractingFromCollectionElement;
          if (interim instanceof Collection) {
             for (Object element : (Collection) interim) {
                res.add(innerExtractor.extract(element));
          } else if (interim instanceof Object[]) {
             for (Object element : (Object[]) interim) {
                res.add(innerExtractor.extract(element));
          } else {
             Class<? extends Object> cls = interim.getClass();
             if (cls.isArray()) {
                // primitive array
                int count = Array.getLength(interim);
                for (int i=0; i<count; ++i) {
                   Object boxedPrimitive = Array.get(interim, i);
                   res.add(innerExtractor.extract(boxedPrimitive));
             } else {
                res.add(innerExtractor.extract(interim));
          return res;
       @Override
       public void readExternal(PofReader reader) throws IOException {
          extractorReturningCollection = (ValueExtractor) reader.readObject(0);
          extractorExtractingFromCollectionElement = (ValueExtractor) reader.readObject(1);
       @Override
       public void writeExternal(PofWriter writer) throws IOException {
          writer.writeObject(0, extractorReturningCollection);
          writer.writeObject(1, extractorExtractingFromCollectionElement);
       // equals() and hashCode() are required to be able to use this extractor to create indexes, where the extractor acts as a key in a hash-map
       @Override
       public int hashCode() {
          final int prime = 31;
          int result = 1;
          result = prime * result
                + ((extractorExtractingFromCollectionElement == null) ? 0 : extractorExtractingFromCollectionElement.hashCode());
          result = prime * result + ((extractorReturningCollection == null) ? 0 : extractorReturningCollection.hashCode());
          return result;
       @Override
       public boolean equals(Object obj) {
          if (this == obj)
             return true;
          if (obj == null)
             return false;
          if (getClass() != obj.getClass())
             return false;
          TwoLevelChainExtractor other = (TwoLevelChainExtractor) obj;
          if (extractorExtractingFromCollectionElement == null) {
             if (other.extractorExtractingFromCollectionElement != null)
                return false;
          } else if (!extractorExtractingFromCollectionElement.equals(other.extractorExtractingFromCollectionElement))
             return false;
          if (extractorReturningCollection == null) {
             if (other.extractorReturningCollection != null)
                return false;
          } else if (!extractorReturningCollection.equals(other.extractorReturningCollection))
             return false;
          return true;
    }Afterwards you can just use this extractor to extract a collection of type codes from rooms:
    ValueExtractor roomsTypeCodes = new TwoLevelChainExtractor(new ReflectionExtractor("getRooms"), new ReflectionExtractor("getTypeCode"));You can use this roomsTypeCodes and a ContainsFilter or ContainsAnyFilter to achieve what you want.
    You can implementing similar stuff for POF extraction by leveraging the PofValueParser class in an EntryExtractor subclass.
    Best regards,
    Robert

  • Custom objects in activity

    Hello all,
    I configured the screen for activity with relation a custom object 1, the custom object I can read, insert, edit ... with no problem the record, but I think that not real relation into record of custom object and record of activity.
    with a report from custom object if link with activiity no data found, if no link with activity the data from custom object is show.
    I need configure any more ?, or is not automatic the relation.
    thank's

    Mani J wrote:
    Have you added new picklist field/value today? If yes you will have to wait till tomorrow.
    -Check your Related Info access profile settings for Activity and CO.not i don't added anything, and today I have the same problem
    the level access from Activity & CO 1 is full access.
    thank's for your interest.

  • Custom Object 1 - Batch Deletion

    Hello,
    I am trying to delete all records using Batch Delete option from a Custom Object. The option is not present in CRMOD even when I am the Admin of CRMOD. I have checked the Access Profile and everything seems alright.
    Please suggest me some alternatives?
    Thank you.
    Regards,
    Rohit Dassani

    Hello,
    you have only one alternative. You could write a program (Java, .Net, etc.) for delete records from Custom Object(s) by using CRMOD Web Service.
    Certainly you can find some samples in the Net.
    Regards

  • Access control for Custom Objects

    Hi,
    I am working with two custom objects: Custom Object 1 and Custom Object 5. There is a team on Custom Object 1.
    The user has access to both and has create access for Custom Object 5.
    The user is not the owner of a record in Custom Object 1, but is on the team for the record with full access.
    When in the related section for the custom object 5 you click on edit I get the following error: "You have read-only access to this record. Click Cancel button or Back link to continue. Access Denied.(SBL-DAT-00284)"
    When you click on the link to the related record and then on edit it works fine, the user can edit and save the changed record.
    I do not understand why this does not work in the related section.
    Thanks for your reply!
    Arnold

    Hi Errol,
    to build your own application authorization scheme around the security model supplied by Apex for administration of the Apex environment would be a bad idea.
    This was never intended for authorization scheme management in custom built Apex applications, it was solely intended to control access in the Apex environment overall. The API for it is not published, and making changes to it, such as adding more roles, would run the risk of breaking the overall Apex security model. It would not be supported by Oracle and Oracle would not guarantee the upwards compatibility of any changes you make in future versions of Apex.
    In short, you should follow Tyson's advice and build your own structure. As he indicated, there are plenty of examples around and provided your requirements are not too complicated, it will be relatively simple.
    Regards
    Andre

  • Mapping and querying Custom Objects for a Contact with REST Api

    Hello All,
    We are hoping to get some details on managing DataCard set through REST APIs. Our implementation goal is to create Contacts and add Custom object for each Contact, or to be precise, add a DataCard Set for each Contact.
    At the moment, to associate a DataCard Set (or Custom Object) to an existing contact, we are supplying following custom object fields during creation of Custom Object:
    new CustomObjectField 
                                                                    name = "MappedEntityType",
                                                                    dataType = Enum.GetName(typeof(DataType), DataType.numeric),
                                                                    type = "CustomObjectField",
                                                                    defaultValue = "0"
                                                             new CustomObjectField
                                                                    name = "MappedEntityID",
                                                                    dataType = Enum.GetName(typeof(DataType), DataType.numeric),
                                                                    type = "CustomObjectField",
                                                                    defaultValue = "<ContactId>"
    Is this the correct approach? This is Based on the information provided here: http://topliners.eloqua.com/community/code_it/blog/2012/05/31/eloqua-api-how-to-mapping-a-data-card-to-an-entity.
    Would the REST API allow us to query the CustomObjects using the MappedEntityId value for later updates? If so, any pointers on how we approach that?
    Thanks in ad.

    Either the MappedEntityID field is not available or I do it wrong, Eloqua is ignoring the field and does not map the custom record with the unique Contact ID
    {"type":"CustomObjectData","ContactID":"8829509","fieldValues":[{"id":"195","value":"[email protected]"},{"id":"220","value":"a0KJ000000387QvMAI"},{"id":"191","value":"001J000001OrL77IAF"},{"id":"193","value":"NowTV MPP"},{"id":"194","value":"8829509"},{"id":"196","value":"Andreas"},{"id":"197","value":"Wolf"},{"id":"198","value":"003J00000145lkBIAQ"},{"id":"210","value":"777666555"},{"id":"199","value":"gbp"},{"id":"200","value":"0"},{"id":"215","value":"0"},{"id":"201","value":"999111999"},{"id":"214","value":"111111"},{"id":"202","value":"222222"},{"id":"204","value":"now"},{"id":"203","value":"xmas"},{"id":"205","value":"no description"},{"id":"206","value":"test"},{"id":"218","value":"holidays"},{"id":"219","value":"PPV-0878545"},{"id":"213","value":"N"},{"id":"212","value":"myself"},{"id":"209","value":"now tv"},{"id":"192","value":"1417542120"},{"id":"207","value":"1417542120"},{"id":"216","value":"1417542240"},{"id":"217","value":"1417542240"},{"id":"211","value":"1417542240"}]},"MappedEntityID":"003J00000145lkBIAQ"}
    Response
    DEBUG|Response------{"type":"CustomObjectData","id":"81720","fieldValues":[{"id":"195","value":"[email protected]"},{"id":"220","value":"a0KJ000000387QvMAI"},{"id":"191","value":"001J000001OrL77IAF"},{"id":"193","value":"NowTV MPP"},{"id":"194","value":"8829509"},{"id":"196","value":"Andreas"},{"id":"197","value":"Wolf"},{"id":"198","value":"003J00000145lkBIAQ"},{"id":"210","value":"777666555"},{"id":"199","value":"gbp"},{"id":"200","value":"0"},{"id":"215","value":"0"},{"id":"201","value":"999111999"},{"id":"214","value":"111111"},{"id":"202","value":"222222"},{"id":"204","value":"now"},{"id":"203","value":"xmas"},{"id":"205","value":"no description"},{"id":"206","value":"test"},{"id":"218","value":"holidays"},{"id":"219","value":"PPV-0878545"},{"id":"213","value":"N"},{"id":"212","value":"myself"},{"id":"209","value":"now tv"},{"id":"192","value":"1417542120"},{"id":"207","value":"1417542120"},{"id":"216","value":"1417542240"},{"id":"217","value":"1417542240"},{"id":"211","value":"1417542240"}]}
    Eloqua:
    Name: PPV-0878545
    Unique Code: a0KJ000000387QvMAI
    Status Registered
    Created Date 12/22/2014 12:44:49 PM
    Mapped NO
    Any Idea how to map this to a contact
    Entity Type is Contacts
    Entity Field is SFDC Contact ID

  • Error when querying custom object 5 using contact Id

    Hi,
    I have related custom object 5 to contacts in CRM On demand. I am trying to find out the custom object 5 records related to contact based on the contact Id. I'm using the query page function in the wsdl for custom object 5 (web services 2.0) and the SOAP UI tool.
    Here is the SOAP request (I replaced the contact id in the xml below ):
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:crmondemand/ws/ecbs/customobject5/10/2004" xmlns:quer="urn:/crmondemand/xml/CustomObject5/Query">
    <soapenv:Header/>
    <soapenv:Body>
    <ns:CustomObject5QueryPage_Input>
    <quer:ListOfCustomObject5 pagesize="?" startrownum="?" recordcountneeded="?">
    <!--Optional:-->
    <quer:CustomObject5 searchspec="?">
    <!--Optional:-->
    <quer:ContactId sortorder="?" sortsequence="?"><+Id from CRM on demand+></quer:ContactId>
    </quer:CustomObject5>
    </quer:ListOfCustomObject5>
    </ns:CustomObject5QueryPage_Input>
    </soapenv:Body>
    </soapenv:Envelope>
    I get the following response:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring>Field 'Contact Id' in the integration component 'CustomObject5' instance contains invalid query expression: <Contact id that I entered in request>(SBL-EAI-13002)</faultstring>
    <detail>
    <siebelf:siebdetail xmlns:siebelf="http://www.siebel.com/ws/fault">
    <siebelf:logfilename>siebel.log</siebelf:logfilename>
    <siebelf:errorstack>
    <siebelf:error>
    <siebelf:errorcode>(SBL-EAI-13002)</siebelf:errorcode>
    <siebelf:errorsymbol/>
    <siebelf:errormsg>Field 'Contact Id' in the integration component 'CustomObject5' instance contains invalid query expression: <Contact id that I entered in request>(SBL-EAI-13002)</siebelf:errormsg>
    </siebelf:error>
    <siebelf:error>
    <siebelf:errorcode>(SBL-EAI-13006)</siebelf:errorcode>
    <siebelf:errorsymbol/>
    <siebelf:errormsg>Invalid operator: <Contact id that I entered in request>(SBL-EAI-13006)</siebelf:errormsg>
    </siebelf:error>
    </siebelf:errorstack>
    </siebelf:siebdetail>
    </detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Can anyone tell me what could be the problem? or what should be the format of the input parameter in the request? I checked in On demand and there should be 1 custom object 5 row returned in the response.

    Hi,
    Thanks a lot . I will try this method too. However, this is how I resolved the problem. I changed my soap request include a search based on contact id:
    <soapenv:Body>
    <cus:CustomObject5QueryPage_Input>
    <quer:ListOfCustomObject5>
    <!--Optional:-->
    <quer:CustomObject5 searchspec="[ContactId]='CRM On Demand Contact Id'">
    <!--You may enter the following 786 items in any order-->
    <quer:Id/>
    <quer:ContactId/>
    <quer:AccountId/>
    <quer:IndexedPick0 />
    </quer:CustomObject5>
    </quer:ListOfCustomObject5>
    </cus:CustomObject5QueryPage_Input>
    </soapenv:Body>
    What I din't realize was that the column names I specified in the quer: tag would be fetched from CRM and returned in the response.
    Regards,

  • Deleting records from the Custom Objects

    Hello all,
    We want to delete all records from a custom object and as there is no 'Batch Delete' functionality on it, we are thinking of other ways to delete all the records. One of the possibilities is to delete all the records by hand, which will be very time consuming, but this might become the best option. Another option is to use webservices to delete the records, but to do so, you will have to write a kind of program that will query for the records and then deletes them. Does anyone have another option or does anyone have written such a tool that I can use to delete the records from the Custom Object?
    Kind regards,
    Niels Rekers

    Hi, To my knowledge WS is the way to do it. We are a system integrator and can help you out in doing this by providing a WS program. If interested you can write to [email protected]
    -- Venky CRMIT

  • Insert Books under Custom Object 15

    We need to insert/remove a Custom Object 15 record into books. Is this possible in Web Services 2.0 toolkit?

    Right. I mean Oracle really needs to get their messaging straight with this stuff. They put out release notices saying R16 will have unlimited objects, but they don't mention that it's not for everybody. Then, I call "Customer Care" and they tell me there's no such thing as unlimited custom objects for anyone. So their corporate messaging and call center are not on the same page with this feature. That's extremely frustrating.

  • Inserting Entry into Custom Object with API

    Hello,
    I have a custom object made and access to both BULK and REST APIs.
    I was wondering how I could take the information I have (It's only 4 fields) and inserting this information as a new record into my data object.
    I have the ID for my data object I just can't seem to find the API call I'm looking for.
    Any help is greatly appreciated!

    Adding new records to a Custom Object is best done using the Bulk API.  You need to define a Custom Object import and use it to sync your records into Eloqua.

  • Checking the status of task records tied to the custom object 3

    We are using custom object 3
    There has been lot of configuration work done on this object.
    There is a checkbox on the UI. When a user will checks off the check box, a task record(s) is created depending on the condition.
    Is there a way for me to check the status on the task records and then set a field on the parent record i.e. custom object 3.
    Thanks,
    Nitika

    To whom are you speaking?

  • Auto-populate fields in Custom Object Based on Another Record

    Hello,
    I am hoping to auto-populate a few default values in a new Custom Object record based on an associated Lead record. The layout is this:
    I use the Lead record to take care of most of the information in the sales stages until the product is sold. The Lead record has fields to record information for a one product sale. The sales person can then use the Custom Object (called 'GX Additional Product') (which shows up in the Related Information section of the Lead record) to add additional items to a sales order request. Many of the fields in the GX Additional Product (custom object) record are identical to fields already filled out in the Lead record.
    What I would like to do, is when a new GX Additional Product (custom object) is added to the Lead record, those identical fields already filled out in the Lead record, by default, populate the corresponding fields in the new GX Additional Product (custom object) record.
    Is this possible? Is this something that can be done with JoinFieldValues? If so, I've had a bit of confusion trying to set up a JoinFieldValues expression.
    If you have any information to share that would be helpful, that would be greatly appreciated! THANKS!

    Hi,
    You can use JoinFieldValue to Custom Objects from other entities, cause you will have other objects' ID recorded inside the CO's, when you open a new detail record associated with the parent. Make sure your custom object is showing as a detail section (N:1) into lead´s main page. Try with one field first, using the exact syntax provided at samples listed at product documentation.
    regards,
    Flavio Amorim
    Brazil
    www.triscal.com.br

Maybe you are looking for