You need to sign in to do that
Don't have an account?
Prabodh S
if the field is having look-up relationship or master detail---- through API
hi,
I am trying to identify the difference between look-up relationship and master-detail relationship.
When I call describe on any custom object then how can i identidy the which field is having look-up relationship and which one is having master-detail relationship.
In short from API I need to identify if the field is having look-up relationship or master-detail relationship.
If there is any property field or any clue in schema, that can help to identify it.
Please help me out........
Thank you in advance.
Regards,
Prabodh
I am trying to identify the difference between look-up relationship and master-detail relationship.
When I call describe on any custom object then how can i identidy the which field is having look-up relationship and which one is having master-detail relationship.
In short from API I need to identify if the field is having look-up relationship or master-detail relationship.
If there is any property field or any clue in schema, that can help to identify it.
Please help me out........
Thank you in advance.
Regards,
Prabodh
The ChildRelationship object which is returned as part of the DescribeSObjectsResult has a boolean called cascadeDelete. Master-detail relationships enforce a cascade delete while lookup relationships do not - my limited testing of this shows that master-detail return the cascadeDelete field as True.
Hope this helps.
Thank you Rick,
Apart from cascadeDelete, master-details is mandatory i.e if the field is having master-detail, it can not be empty while updating object data.
Could you give your views on this.
Regards
Prabodh