public string GetCustomFieldsSelect(ReferenceType refType, int?auxID, string refIDFieldName)
        {
            CustomFields = new CustomFields(LoginUser);
            int          orgID        = LoginUser.OrganizationID;
            Organization organization = Organizations.GetOrganization(LoginUser, LoginUser.OrganizationID);

            if (organization != null && organization.ParentID != 1)
            {
                orgID = (int)organization.ParentID;
            }
            _customFields.LoadByReferenceType(orgID, refType, auxID);
            return(GetCustomFieldsSelect(CustomFields, refIDFieldName));
        }
Exemplo n.º 2
0
        public void ValidatePositions(int organizationID, ReferenceType refType, int auxID)
        {
            CustomFields fields = new CustomFields(LoginUser);

            fields.LoadByReferenceType(organizationID, refType, auxID);
            int i = 0;

            foreach (CustomField field in fields)
            {
                field.Position = i;
                i++;
            }
            fields.Save();
        }