public void Execute(CaseEx request, CaseActionEnum action) { var fieldConfig = CaseRepository.GetFields(request.RecordType, action); var sfdcSetting = SfdcSetting.Setting(request.RecordType); if (sfdcSetting != null) { if (string.IsNullOrWhiteSpace(fieldConfig.AssemplyName)) { //make assumption that AssemplyName is the same as the current project's AssemplyName fieldConfig.AssemplyName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; } if (string.IsNullOrWhiteSpace(fieldConfig.ClassName)) { //make assummption that a class a created under Gdot.Partner.Care.SFDC.Logic.RecordTypes namespace + recordtype fieldConfig.ClassName = action == CaseActionEnum.Create ? $"{fieldConfig.AssemplyName}.RecordTypes.{Path.GetFileNameWithoutExtension(sfdcSetting.CaseSettingPath)}" : $"{fieldConfig.AssemplyName}.RecordTypes.{Path.GetFileNameWithoutExtension(sfdcSetting.UpdateCaseSettingPath)}"; } var recordTypeObj = _createRecordTypeFunc(request.RecordType); recordTypeObj?.Execute(request); } }