You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code for trying to create a CustomObject (Notice I added accountId)
List<FieldValue> coFieldValuesCreate = new List<FieldValue>()
{
new FieldValue { id = 279, value = "[email protected]" }
};
CustomObject coCreate = new CustomObject();
if (customObjectType == CustomObjectType.Contact)
{
coCreate.contactId = 775169;
}
else if (customObjectType == CustomObjectType.Account)
{
coCreate.accountId = 3831189;
}
coCreate.fieldValues = coFieldValuesCreate;
CustomObject createResult = Credentials.client20.Data.CustomObject.Post(coCreate);
customObjectId = createResult.id;
I always get endpoint not found when trying to call CustomObject createResult = myClient.Data.CustomObject.Post(myCustomObject);
I fear this is because Eloqua.Api.Rest.ClientLibrary.Models.Data.CustomObjects.CustomObjects.cs has its resource always poiting to: [Resource("/data/customObject", "CustomObject")]
POST endpoint /api/REST/2.0/data/customObject/{parentId}/instance
I ran into this issue as well and have a fix for it. I think it's because the api has changed since the library was written. I'll try to get my changes into pull request this weekend.
I have the following code for trying to create a CustomObject (Notice I added accountId)
I always get endpoint not found when trying to call
CustomObject createResult = myClient.Data.CustomObject.Post(myCustomObject);
I fear this is because Eloqua.Api.Rest.ClientLibrary.Models.Data.CustomObjects.CustomObjects.cs has its resource always poiting to:
[Resource("/data/customObject", "CustomObject")]
POST endpoint
/api/REST/2.0/data/customObject/{parentId}/instance
DELETE endpoint
/api/REST/2.0/data/customObject/{parentId}/instance/{id}
GET endpoint
/api/REST/2.0/data/customObject/{parentId}/instance/{id}
PUT endpoint
/api/REST/2.0/data/customObject/{parentId}/instance/{id}
How are these used?
I also tried calling
CustomObject getResult = Credentials.client20.Data.CustomObject.Get(125);
And still get endpoint not found
Note: Calls for contacts work perfectly.
Source: http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAC/api-Application-2.0-Custom%20object%20data.html
The text was updated successfully, but these errors were encountered: