You need to sign in to do that
Don't have an account?
Prabodh S
not able to identiy master-detail relationship from 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
1) They are required
2) The exhibit cascade delete from the master
You can detect 1) by looking at the field's nillable property from describe and you can detect 2)from the Cascade Delete property on the child relationship from the describe of the related object.
You need to identify which makes more sense for your requirements as it is possible and likely that lookups will be able to be flagged as required someday (making them show up the same as M/D from a nillible property perspective) and the same could be true for cascade delete.
I think I can make use of nillable property.
In both the case it'll work for me. I need to make sure that if it is required(also in case of lookup) then the field should not be empty while inserting record.
Regards,
Prabodh