Groovy代码示例

//动态关联字段可以绑定的对象
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

2024-10-22
0 3