- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
08-08-2012 09:50 AM
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:
Any help would be really appreciated.
Solved! Go to Solution.
08-09-2012 12:17 AM
Actually even adding a LOOKUP field on a regular custom object does not seem to work, simply ignored by the service without any errors. Non-relationship fields can be added just fine but something is wrong with adding relationship fields.
08-09-2012 01:29 PM
Ok, I think I finally figured this out. Here is the correct settings:
"Contacts" was not allowed for the Contact object
08-16-2012 06:49 AM
It looks like you've figured this out already.
I have found that, when working with the metadata API, it is a good practice to investigate the XML files used in the IDE to see how the attributes are used.
In this case I would have looked at an existing Master-Detail relationship in a .object file. It will look something like this. You can use these values as a guide to the attributes in the metadata API.
<fields> <fullName>Pay_Period__c</fullName> <deprecated>false</deprecated> <externalId>false</externalId> <inlineHelpText>The Pay Period for this timesheet.</inlineHelpText> <label>Pay Period</label> <referenceTo>Pay_Period__c</referenceTo> <relationshipName>Timesheets</relationshipName> <relationshipOrder>0</relationshipOrder> <trackHistory>false</trackHistory> <type>MasterDetail</type> <writeRequiresMasterRead>false</writeRequiresMaste
08-18-2012 02:57 AM
yes, thank you. it's my first time using this api and I was not properly checking the status/errors, basically missing an important error message. finally figure it out. still alot to learn but I seem to be moving along just fine now.