public void UpdateDeficiencyRecordStatus(IDataService dataService, IRecordPointer <Guid> deficiencyId, eDeficiencyStatusEnum status)
        {
            ccllc_transactiondeficiency_statuscode statusCode = ccllc_transactiondeficiency_statuscode.Active;
            ccllc_transactiondeficiencyState       stateCode  = ccllc_transactiondeficiencyState.Active;

            switch (status)
            {
            case eDeficiencyStatusEnum.Cleared:
                stateCode  = ccllc_transactiondeficiencyState.Inactive;
                statusCode = ccllc_transactiondeficiency_statuscode.Cleared;
                break;

            case eDeficiencyStatusEnum.Waived:
                stateCode  = ccllc_transactiondeficiencyState.Active;
                statusCode = ccllc_transactiondeficiency_statuscode.Waived;
                break;
            }

            var record = new ccllc_transactiondeficiency
            {
                Id         = deficiencyId.Id,
                statecode  = stateCode,
                statuscode = statusCode
            };

            dataService.ToOrgService().Update(record);
        }
        public IRequirementDeficiencyRecord CreateDeficiencyRecord(IDataService dataService, string name, IRecordPointer <Guid> transactionId, IRecordPointer <Guid> requirementId)
        {
            var record = new ccllc_transactiondeficiency
            {
                ccllc_name          = name,
                ccllc_TransactionId = transactionId?.ToEntityReference(),
                ccllc_RequirementId = requirementId?.ToEntityReference(),
                statuscode          = ccllc_transactiondeficiency_statuscode.Active
            };

            record.Id = dataService.ToOrgService().Create(record);

            return(record);
        }