Salesforce Custom Object Relationship Creation -



Salesforce Custom Object Relationship Creation -

i have posted on over sales forcefulness development boards...

hi guys...

i want create 2 objects , link them via parent kid relationship in c# using metadata api.

i can create objects , 'custom' fields objects via metadata, service ignores field def relationship.

by snipet fields 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, 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 kid objext looks

ljutestchildobject id, postcode, text(50)

i want link parent kid 1 "ljutestobject", can have many "ljutestchildobjects"

what values need fieldtype, relationshipname, , relationshiporder create happen?

thanks guys

lju

i've not created these through meta info api myself, i'd suggest that:

relationshipname = "ljutestobject__c.ljutestobject_id__c

should be:

relationshipname = "ljutestobject__c.id

as id standard field, __c suffix used custom fields (not standard fields on custom objects). also, may relationship total name should end in __c not __r, seek alter above first , see how go.

salesforce

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -