Sunday 1 September 2013

Get Acivity type Code plugin code mscrm 2011




       private bool GetActivityType(IOrganizationService service, Guid mentionId,int entityTypecode )
        {
            Boolean flag = false;
            switch (entityTypecode)
            {
                case 4201:
                    flag=GetActivityRecordType(service, mentionId, "appointment");
                    break;
                case 4202:
                   flag= GetActivityRecordType(service, mentionId, "email");
                    break;
                case 4204:
                   flag= GetActivityRecordType(service, mentionId, "fax");
                    break;
                case 4207:
                    flag= GetActivityRecordType(service, mentionId, "letter");
                    break;
                case 4210:
                    flag = GetActivityRecordType(service, mentionId, "phonecall");
                    break;
                case 4212:
                   flag= GetActivityRecordType(service, mentionId, "task");
                    break;
                case 4251:
                    flag = GetActivityRecordType(service, mentionId, "recurringappointmentmaster");
                    break;
                case 4214:
                    flag = GetActivityRecordType(service, mentionId, "serviceappointment");
                    break;
                default: break;
            }
         return flag;
        }
    }
}

No comments:

Post a Comment