Set the range of objects that a dynamic association field can associate with.
1. Configuration method

Bind the scope rule function of the association object in the optional data range of the dynamic association field
2. Function writing template
Groovy:
//Objects that can be bound to dynamic association fields
List objectApiNames = ["object_KkdtL__c","AccountObj","object_qep6N__c"]
def list = []
objectApiNames. each {
item->
RelatedObjectData objRelate = RelatedObjectData. builder()
.apiName(item)
.build()
list. add(objRelate)
}
// log. info(list)
RelatedObject relatedObject = RelatedObject.builder()
.objectList(list)
.build()
return relatedObject