代码如下:
IMetaDataService metadataService = ServiceHelper.GetService
FormMetadata metadata = metadataService.Load(this.Context, "BOS_OperateLog") as FormMetadata;
DynamicObject logObj = new DynamicObject(metadata.BusinessInfo.GetDynamicObjectType());
logObj["FUserId_Id"] = this.Context.UserId;
logObj["FOrgId_Id"] = this.Context.CurrentOrganizationInfo.ID;
logObj["FComputerName"] = this.Context.ComputerName;
logObj["FEnvironment"] = 3; //业务操作
logObj["FDatetime"] = DateTime.Now;
logObj["FIpAddress"] = this.Context.IpAddress;
logObj["FSubSystemId_Id"] = this.BusinessInfo.GetForm().SubsysId;
logObj["FObjectTypeId_Id"] = this.BusinessInfo.GetForm().Id;
logObj["FOperateName"] = "修改";
logObj["FDescription"] = modified.ToString();
ISaveService saveService = ServiceHelper.GetService
IOperationResult result = saveService.Save(this.Context, metadata.BusinessInfo, new DynamicObject[] { logObj });
调试跟踪result记录是成功的提示,但在后台表(T_BAS_OperateLog)中就是查不到此条记录,哪里控制了?
推荐阅读