//动态关联字段可以绑定的对象
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
Groovy代码示例
2024-10-22