• DDG_LJU
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

Hi there, 

 

I have create a remote access entry, but cannot see how I add it to my managed package. I read elsewhere that it needs to be the first thing added to the managed package when it is first created.

 

There is no "new" button on the packages "Remote access" tab; and the Remote access page has "no" in the "installed in package" column.

 

Any pointers ?

 

Cheers

 

Logie Urquhart

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

When I add the tag for the externalIDFieldName (also tried externalIdFieldName)

 

<?xml version="1.0" encoding="utf-8"?>
<jobInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.force.com/2009/06/asyncapi/dataload">
  <operation>upsert</operation>
  <object>Prospect__c</object>
  <contentType>CSV</contentType>
  <externalIDFieldName>Urn__c</externalIDFieldName>
</jobInfo>

 

and send this to the API, I get back

 

<?xml version="1.0" encoding="UTF-8"?><error
   xmlns="http://www.force.com/2009/06/asyncapi/dataload">
 <exceptionCode>InvalidJob</exceptionCode>
 <exceptionMessage>Unable to parse Job</exceptionMessage>
</error>

 

If I leave the externalIdFieldName tag out

 

<?xml version="1.0" encoding="utf-8"?>
<jobInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.force.com/2009/06/asyncapi/dataload">
  <operation>upsert</operation>
  <object>Prospect__c</object>
  <contentType>CSV</contentType>
</jobInfo>

 

I get

 

<?xml version="1.0" encoding="UTF-8"?><error
   xmlns="http://www.force.com/2009/06/asyncapi/dataload">
 <exceptionCode>InvalidJob</exceptionCode>
 <exceptionMessage>External ID was blank for Prospect__c. An External ID must be specified for upsert.</exceptionMessage>
</error>

 

Any ideas

 

Also, is there a resource that I can use to get the full XML specification for these batch requests and responses?

 

Thanks

Simon

I have a requirement where I need to send sample requests to Contact or Lead which is achieved with a 'Sample Request' custom object with look up relationship to 'Contact' as well as 'Lead'. There will a 'Sample Request' button in the Contact Page and also one on the Lead Page. When user clicks on Sample Request from Contact, I should show only Contact look up whereas when it comes from Lead, it should show only the Lead look up. I had to create 2 page layouts to accomplish this and assign unique record types  for the 'Sample Request' custom object.

 

I am wondering if this can be achieved similar to how 'Name' field works in 'Task' UI. In 'Task' standard object there is field called name which is of datatype ' Lookup(Contact,Lead)  ' This provides a UI which  contains  a dropdown with 'Lead' or 'Contact' values together with a text field and a lookup icon.

 

Doing some research I do not think this is a standard feature available.

 

If this can be done, I need only one page layout.

 

Any suggestions

  • March 16, 2010
  • Like
  • 0