国产精品,日韩av,hdsexvideos中国少妇,xxxxx性bbbbb欧美熟妇,波多野结衣乳巨码无在线,国产成人亚洲精品乱码

APL函數(shù)代碼開放場(chǎng)景-流程Groovy代碼示例

2024-12-26 09:43:28 370 本站

APL函數(shù)里獲取觸發(fā)函數(shù)的主從數(shù)據(jù)

// 流程后動(dòng)作函數(shù)里面的context.data數(shù)據(jù)并不會(huì)實(shí)時(shí)計(jì)算計(jì)算字段,引用字段等,也不會(huì)查相關(guān)團(tuán)隊(duì)等信息
// 建議有實(shí)時(shí)獲取計(jì)算引用字段需求的再使用FQL查詢下相關(guān)數(shù)據(jù),F(xiàn)QL里面有參數(shù)控制是否查詢相關(guān)信息

String objectId = context.data["_id"]
String objectApiName = context.data["object_describe_api_name"]
FQLAttribute fqlAtrr  = FQLAttribute.builder()
 .columns(["_id", "name"]) //需要查詢的字段
 .build()

SelectAttribute selectAtrr = SelectAttribute.builder()
 .needInvalid(false) //是否需要查作廢數(shù)據(jù)
 .build()

//查詢主對(duì)象數(shù)據(jù)
def (Boolean error, Map objectData, String message) = Fx.object.findById(objectApiName, objectId, fqlAtrr, selectAtrr)
if (error) {
 log.info("error:" + message)
}
log.info(objectData)

//如果有從對(duì)象數(shù)據(jù)也可以查詢從數(shù)據(jù)
QueryTemplate query = QueryTemplate.AND(
 ["field_57s3W__c": QueryOperator.EQ(objectId)] //主從關(guān)系字段
)

FQLAttribute fqlAtrr2  = FQLAttribute.builder()
 .queryTemplate(query)
 .columns(["_id", "name"])
 .build()
def (Boolean err2, QueryResult result, String message2) = Fx.object.find("object_adev4__c", fqlAtrr2, selectAtrr)
if (err2) {
 log.info("find object_adev4__c error:" + message2)
}
log.info(result)
List dataList = result["dataList"] as List
dataList.each { it ->
 log.info(it["name"])
}



部分內(nèi)容來源于互聯(lián)網(wǎng),如有侵權(quán),請(qǐng)聯(lián)系客服刪除處理。
在線咨詢 撥打電話