public AttributeRequestGenerator(AttributeExcelSheetsInfo sheet, OptionSetMetadataBase [] optionSetData)
 {
     languageCode          = sheet.language;
     organizationPrefix    = sheet.orgPrefix;
     this.filteredMetadata = sheet.entityMedata.Attributes;
     this.entityLocialName = sheet.entityMedata.LogicalName;
     this.optionSetData    = optionSetData;
 }
        public void CreatenNewAttributesSheet(Guid entityId)
        {
            GlobalApplicationData data          = GlobalApplicationData.Instance;
            EntityMetadata        currentEntity = CRMOpHelper.RetriveEntityAtrribute(entityId);
            string sheetName = Utils.getLocalizedLabel(currentEntity.DisplayName.LocalizedLabels, data.currentLanguage);
            AttributeExcelSheetsInfo attributesSheet = new AttributeExcelSheetsInfo(currentEntity, GlobalOperations.Instance.getCurrentSolutionPubblisher());

            CreatenNewExcelSheet(sheetName, attributesSheet);
            IEnumerable <string> formAttr = CRMOpHelper.GetAttributeOfTheMainForm(currentEntity.ObjectTypeCode.Value);

            ExcelOperations.refreshAttributeSheeet(data.eSheetsInfomation.getCurrentSheet(), currentEntity, GlobalApplicationData.Instance.allEntities, formAttr);
        }