Professional Documents
Culture Documents
attachment functionality to forms, which can be used both for custom & standard form
Contents
y y y y y y y y y y
Enabling functionality Information Required Define Document Entities Define Document Categories Enable attachments for the form Define document categories to be available Define blocks to enable attachments for Identify block Identify Entities Validate functionality
Enabling functionality
With Application Developer responsibility, we'll use forms below Attachments menu to manage this feature. A custom form with this features not enabled, Turtle Logistic Entry (LGT), will be used for this test.
Picture 1
Information Required
Once the block we want to enable attachments for is identified, we have to identify the following information for it.
y y y y y
Form Name: MLS_LGTCUSTENTR_NEW Function Name: MLS_LGTCUSTENTR_NEW Block Name: MLS_LGT_TRANSACTIONS Base Table Name: MLS_LGT_TRANSACTIONS Primary Key Columns: MLS_LGT_TRANSACTIONS.LGT_NO
y y y y y
Table: Base table name (MLS_LGT_TRANSACTIONS) Entity Id: Base table name (MLS_LGT_TRANSACTIONS) Entity Name: Business Object (Turtle Logistic Entry) Prompt: (Logistic POD) Application: Choose the application owning the base table from the list (Turtle Custom Application).
Picture 2
Short Text. Up to 2000 characters. Long Text. Information is stored in a long column. URL. Standard URI. Opened in a Web Browser. File. External files, loaded to the database trough and upload page akin to web mail attachments.
What we do here is to define a meaningful name to the use the attachment will have, for example Deal, Contract, and assign the adequate type to it. We must review if default categories can be used and if not define new ones. In this example we'll define a Turtle Logistic Attachment category of type file. Open the Document Categories form, create a new record and indicate a name for the category and the type to be used for it.
Picture 3
Picture 4 In the Name field specify the form or function short name, save your entry. Don't close the form. Optionally define a context field to be used in the attachments window.
Picture 5
Identify block Click on the blocks button and define a method, which can be Allow Change and Query Only. This in combination with attachment level definition allows for security, having for example a manage function to allow changes and a query only one. Have in mind that we can have more than one block per form. For the Turtle Logistic Entry form we only have a block, MLS_LGT_TRANSACTIONS.
Picture 6 Additional security can be enforced at different levels of access, Organization (Manufacturing), Set of Books (Financials) or Business Unit (Human Resources), one at a time. Additional context fields can also be defined here, in order to have more information related to the entity displayed in the attachments window. Save changes Identify Entities Click on entities button. Consider that we can have more than one entity in a block, for example a base one and a foreign one, such as a PO, having information related to the header (base) and other to the vendor (related).
Picture 7
Indicate the Entity associated to the block, in this case Turtle Logistic Entry form as previously defined. Use the main Entity display method for attachments for the base entity of the block and related entity otherwise. Main entity is used for the sample. When the first method is used and you want to have the attachment icons to show that attachments are associated with the entity, check the Include in Indicator check box. On the Privileges Tab You can define if Query/Insert/Update and delete of attachments is allowed or not, always, never or based on a condition verified against a field on the block.
Picture 8 On the Primary Key Fields define all the fields used as primary key for the base table. The SQL Statement tab is for advanced functionality and not within the scope of this guide.
Validate functionality
Open the form, and check for the paper clip button to be enabled. Query or enter a new record and click on the attachments icon. Turtle Logistic Attachment and comments must be available for the document categories.
Picture 9