# Fx.object/object

create:创建业务对象

Fx.object.create( <String apiName>,  <Map objectData>)

def (Boolean error,Map data , String errorMessage) =  Fx.object.create("AccountObj",["name":"客户"])

或:

object.create( <String apiName>,  <Map objectData>)

 def (Boolean error,Map data , String errorMessage) =  object.create("AccountObj",["name":"客户"])

返回值data类型为:Map

update:更新业务对象字段

Fx.object.update( <String apiName>,  <String objectDataId>,  <Map objectData>)

def (error, data, errorMessage) =  Fx.object.update("AccountObj","id123456",["name":"纷享销客"])

或:

object.update( <String apiName>,  <String objectDataId>,  <Map objectData>)

 def (Boolean error,Map data , String errorMessage) =  object.update("AccountObj","id123456",["name":"纷享销客"])

返回值data类型为:Map

findById:按业务对象Id查询业务对象数据

Fx.object.findById( <String apiName>,  <String objectDataId>)

 def (Boolean error,Map data , String errorMessage) =  Fx.object.findById("AccountObj","id123456")

或:

object.findById( <String apiName>,  <String objectDataId>)

 def (Boolean error,Map data , String errorMessage) =  object.findById("AccountObj","id123456")

返回值data类型为:Map

find:按查询条件查询业务对象

Fx.object.find( <String apiName>, <List<Map> criteria>,  <BigDecimal limit>,  <BigDecimal skip>)

def (Boolean error, QueryResult data,String errorMessage) = Fx.object.find("AccountObj",[["name":"分享逍客"],     ["create_time": GT(19000000)]]);

或:

object.find( <String apiName>, <List<Map> criteria>,  <BigDecimal limit>,  <BigDecimal skip>)

 def (Boolean error, QueryResult data,String errorMessage) = object.find("AccountObj",[["name":"分享逍客"],     ["create_time": GT(19000000)]]);

返回值data类型为:QueryResult

log.info(data.size);
log.info(data.total);
log.info(data.dataList); //list类型,里面数据是Map

Fx.object.find方法中的条件语句如下:

(1).判断相等:

EQ(<Object str>)

(2).判断不相等:

NE(<Object str>)

(3).判断大于:

GT(<Object str>)

(4).判断小于:

LT(<Object str>)

(5).判断大于等于:

GTE(<Object str>)

(6).判断小于等于:

LTE(<Object str>)

(7).判断是否包含:

LIKE(<String str>)

(8).判断不包含:

NLIKE(<String str>)

(9).判断属于其中一个:

IN(<List str>)

(10).判断不属于其中:

NIN(<List list>)

remove:作废业务对象

Fx.object.remove( <String apiName>,  <String objectDataId>)

 def (Boolean error,Map data , String errorMessage) =  Fx.object.invalid("AccountObj","id123456")

或:

object.remove( <String apiName>,  <String objectDataId>)

 def (Boolean error,Map data , String errorMessage) =  object.invalid("AccountObj","id123456")

返回值data类型为:Map

changeOwner:更换负责人:

Fx.object.changeOwner((<String ObjectAPIName>,<String ObjectDataId>,<String OwnerId>)

Example: Fx.object.changeOwner("AccountObj","ed47841898054749a2ec9be9e6e5d728","1001")

或:

object.changeOwner((<String ObjectAPIName>,<String ObjectDataId>,<String OwnerId>)

Example: object.changeOwner("AccountObj","ed47841898054749a2ec9be9e6e5d728","1001")

addTeamMember:添加团队成员:

Fx.object.addTeamMember(<ObjectAPIName>,<ObjectDataId>,<UserIdList>,<Role>,<Permission>)

Example: Fx.object.addTeamMember("AccountObj","83cf73d957924284a96e9c44ebb333ec",["1001"],4,1)

或:

object.addTeamMember(<ObjectAPIName>,<ObjectDataId>,<UserIdList>,<Role>,<Permission>)

Example: object.addTeamMember("AccountObj","83cf73d957924284a96e9c44ebb333ec",["1001"],4,1)

deleteTeamMember:删除团队成员:

Fx.object.deleteTeamMember(<ObjectAPIName>,<ObjectDataId>,<UserIdList>)

Example: Fx.object.deleteTeamMember("AccountObj","83cf73d957924284a96e9c44ebb333ec",["1001"])

或:

object.deleteTeamMember(<ObjectAPIName>,<ObjectDataId>,<UserIdList>)

Example: object.deleteTeamMember("AccountObj","83cf73d957924284a96e9c44ebb333ec",["1001"])

editTeamMember:编辑团队成员:

Fx.object.editTeamMember(<ObjectAPIName>,<ObjectDataId>,<teamMemberList>)

或:

object.editTeamMember(<ObjectAPIName>,<ObjectDataId>,<teamMemberList>)

getTeamMember:获取团队成员:

Fx.object.getTeamMember(<String objectAPIName> , <String objectId>)

或:

object.getTeamMember(<String objectAPIName> , <String objectId>)

results matching ""

    No results matching ""