• Yoxel
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies

Hello,  I am trying to create a custom junction object, and one of the relationship fields is supposed to point to Contact.

I can not find any documentation that would explain well which properties exactly and how need to be set for master-detail relationship fields. As a result the service silently ignores my creation request. Here is the first field that I am trying to add but it would not add:


fullNAme=MyCustomObject__c.Contact_c
label=Contact
type=FieldType.MASTER_DETAIL
rteferenceTo=Contact
relationshipLabel=Participant
relationshipName=Contact.Id
relationshipOrder=0

 

 Any help would be really appreciated.

 

-Alexey

  • August 08, 2012
  • Like
  • 0

Hello,  I am trying to create a custom junction object, and one of the relationship fields is supposed to point to Contact.

I can not find any documentation that would explain well which properties exactly and how need to be set for master-detail relationship fields. As a result the service silently ignores my creation request. Here is the first field that I am trying to add but it would not add:


fullNAme=MyCustomObject__c.Contact_c
label=Contact
type=FieldType.MASTER_DETAIL
rteferenceTo=Contact
relationshipLabel=Participant
relationshipName=Contact.Id
relationshipOrder=0

 

 Any help would be really appreciated.

 

-Alexey

  • August 08, 2012
  • Like
  • 0

Hi guys...

 

I want to create two objects and link them via a parent child relationship in C# using the Metadata API.

 

I can create objects and 'custom' fields for the objects via the metadata, but the service just ignores the field def for the realtionship.

 

By snipet for the fields are as follows :

 

CustomField[] fields = new CustomField[] { new CustomField()
{
type = FieldType.Text,
label = "FirstName",
length = 50,
lengthSpecified = true,
fullName = "LJUTestObject__c.FirstName__c"
},
new CustomField()
{
type = FieldType.Text,
label = "LastName",
length = 50,
lengthSpecified = true,
fullName = "LJUTestObject__c.Lastname__c"
},
new CustomField()
{
type = FieldType.Text,
label = "Postcode",
length = 50,
lengthSpecified = true,
fullName = "LJUTestChildObject__c.Postcode__c"
},
new CustomField()
{
type = FieldType.MasterDetail,
//label = "Postcode",
relationshipLabel = "PostcodeLookup",
relationshipName = "LJUTestObject__c.LJUTestObject_Id__c",
relationshipOrder = 0,
relationshipOrderSpecified = true,
fullName = "LJUTestChildObject__c.Lookup__r"
}
};

 

The parent object looks like

 

LJUTestObject

ID,

FirstName, Text(50)

        LastName, Text(50)

 

the child objext looks like 

 

LJUTestChildObject

ID,

        Postcode, Text(50)

 

I want to link the parent to the child so one "LJUTestObject", can have many "LJUTestChildObjects"

 

What values do I need for FieldType, RelationshipName, and RelationshipOrder to make this happen?

 

Thanks guys

 

LJU

I want to get deleted records similar to the way the Soap library .queryAll() works, or the way the [ Select ... QUERY ALL ] works in Apex. Is there a way of doing this using the rest api?

 

I've tried a few different things without any luck:

 

"/services/data/v23.0/query/?q=Select ... QUERY ALL"

"/services/data/v23.0/queryAll/?q=Select ... "

"/services/data/v23.0/query_all/?q=Select ... "

 

so for now I'm back to soap :(

 

 

Thanks

 

Ben

  • November 03, 2011
  • Like
  • 0

What is the difference between the SytemModStamp and LastModifiedDate fields.  Please give an example.

Michael S. Scherotter