Use entity.Save() and entity.InsertToDB() to save new record

Hi all,

    I try to use class Entity to save data, here is my code:

DsslmContractActivityLogData logData = new DsslmContractActivityLogData(UserConnection);
                logData.DsslmLogId = logId;
                logData.DsslmSchemaPrimaryKeyValue = item.SchemaPrimaryKey;
                logData.DsslmSchemaName = item.SchemaName;
                logData.DsslmSchemaJsonData = item.JsonData;
                if (!logData.InsertToDB())
                {
                    this.Logger.Info("Create log failed");
                }

The result is always false without any error message. What happen?

Like 0

Like

1 comments

Dear Toan,

 

Unfortunately, it is difficult to determine the root cause of the issue without debugging the source code. Please try to use the “Insert” class instead of the current approach. Please find more information about this class in the article by the link below:

 

https://academy.creatio.com/documents/technic-sdk/7-16/insert-class

 

Best regards,

Norton

Show all comments