1Ci Support Help Center home page
Submit a request
Sign in
  1. 1Ci Support
  2. 1C:Drive FAQ
  3. Administration & Development

How to create additional attributes functionality for a catalog which I have created in the extension

  • Administration & Development
    • Print form is unavailable or has missing data
    • Add Template To Print Form Templates List
    • Using product's shelf life
    • Documents not showing in the subordination structure
    • How to setup and work with distributed infobases in 1C:Drive
    • What to check in 1C:Drive if the work in progress documents do not plan
    • WIP document fails to post: what to check
    • How to cancel the necessity to use "Allow editing attributes" command for changing attributes of catalogs
    • How to add the standard print button to a list form
    • Localizing 1C:Drive with country-specific functions
See more

Question: I have created my own catalog in the extension. How can I apply the built in additional attributes functionality to this catalog?

Answer: Let’s assume we are using 1C:Drive with an extension called “MyExtension” with name prefix “MyExt_”. We have already created the “MyExt_Catalog” in the extension and want to add additional attributes functionality to this catalog. Please follow those steps and it should work for you:

  • Take to the extension functional option UseAdditionalAttributesAndInfo, constant UseAdditionalAttributesAndInfo, catalogs ObjectPropertyValueHierarchy, ObjectsPropertyValues, Users, chart of characteristic types AdditionalAttributesAndInfo. Take only the objects themselves, no need to take the attributes or tabular sections of the objects.1.png
  • Take to the extension ObjectKindByType method from the “Common” common module by using Around directive. Change the procedure in the extension as shown in the screenshot below.2.png
  • Add to our catalog in the extension a tabular section called “AdditionalAttributes”. This tabular section must have three fields: Property (ChartOfCharacteristicTypesRef.AdditionalAttributesAndInfo), Value (CatalogRef.ObjectsPropertiesValues, Boolean, CatalogRef.ObjectPropertyValueHierarchy, String, Date, Number, CatalogRef.Users), TextString (String, length = 0, open ended).3.png
  • Open the item form of our catalog, add to the form items “GroupAdditionalAttributes” group, Type = regular group, Representation = none, Group = vertical.4.png
  • Create OpenAdditionalAttributes command of the form, Action = OpenAdditionalAttributes, Functional options = UseAdditionalAttributesAndInfo. Place the command under the “GroupAdditionalAttributes” form item. Type of the form item of the command = Hyperlink.5.png
  • In the form module of our catalog, create the procedures and fill in the code as seen in the screenshot below.6.png
  • We have to add to the AdditionalAttributesAndInfoSets catalog a new predefined element which must be named as “Catalog_” + name of our catalog which we have created in the extension. Unfortunately, in order to achieve this, we have to allow modifications to the main configuration first. That’s because until version 8.3.20, extensions functionality of the 1C:Enterprise Platform did not support adding predefined elements to catalogs which reside in the main configuration, and the built in additional attributes functionality dictates that the AdditionalAttributesAndInfoSets catalog element must be predefined (creating it with via programming as not predefined won’t work). Also please note that as of version 1.3.15, 1C:Drive does not support 8.3.20 platform yet, so upgrading to 8.3.20 platform is not an option.7.png
  • We have added the needed predefined catalog element to the AdditionalAttributesAndInfoSets catalog, we still need to change it’s “Used” attribute value to True though. In order to achieve this, from the enterprise regime open Settings -> Application settings -> Support and service -> Data adjustment -> Bulk attribute editing. For the AdditionalAttributesAndInfoSets be shown in the items to edit field, we first have to activate the “Show service attributes” setting from the Additional parameters dialog. Afterwards, filter our predefined AdditionalAttributesAndInfoSets catalog element and change it’s “Used” attribute value to True.8.png
  • Now our catalog has appeared on the form. Add an additional attribute to our catalog and check if it is working correctly.9.png
  • MyExtension.cfe
    20 KB Download
© 2020-2021 1C INTERNATIONAL LLC www.1Ci.com Support policy