To Allow Attachments to a Particular Form
Users of MYOB Acumatica Framework-based and MYOB Acumatica applications can attach files, notes, and activities to master records displayed on forms. They can also attach files and notes to the detail records, which are displayed in table rows on forms. In this topic, you can find information about how to allow attachments to a particular form and the table rows on a specific form.
For more information about how a user can attach files and notes to forms, see To Attach a File to a Record and To Attach a Note to a Record. For information about activities, see Managing Emails and Activities.
To Allow Attachments to a Particular Form
- In the data access class (DAC) that provides data for the form, add the
NoteID field, as the following code
shows.
#region NoteID public abstract class noteID : PX.Data.IBqlField { } [PXNote] public virtual Guid? NoteID { get; set; } #endregion
Note:The database table that corresponds to the DAC must contain theNoteID
column with theuniqueidentifier
data type. - Rebuild the project.
Once you have added the NoteID field to the DAC and rebuilt the project, the following buttons appear on the title bar of the form:
- Notes, which users click to attach notes to the form
- Files, which users click to attach files to the form
- Optional: To change whether each of these elements is displayed on the title bar, in the
ASPX code of the form, specify the values of the following properties of the
PXFormView control:
- NoteIndicator: Indicates (if set to
True
) that the Notes button is displayed on the title bar. - FilesIndicator: Indicates (if set to
True
) that the Files button is displayed on the title bar. - ActivityIndicator: Indicates (if set to
True
) that the Activities button is displayed on the title bar. This button, which users click to attach activities to the form, is not displayed by default.
Note:The LinkIndicator property, which controlled whether the element was displayed on the title bar, is now obsolete. is always displayed on the title bar. - NoteIndicator: Indicates (if set to
To Allow Attachments to Table Rows on a Form
- In the data access class (DAC) that provides data for the table rows, add the
NoteID field, as the following code
shows.
#region NoteID public abstract class noteID : PX.Data.IBqlField { } [PXNote] public virtual Guid? NoteID { get; set; } #endregion
Note:The database table that corresponds to the DAC must contain theNoteID
column with theuniqueidentifier
data type. - Rebuild the project.
Once you have added the NoteID field to the DAC and rebuilt the project, the following columns appear in the table:
- : The Notes column, which users click to attach notes to the form
- : The Files column, which users click to attach files to the form
- Optional: To change whether each of these columns is displayed in the table, in the ASPX
code of the form, specify the values of the following properties of the
PXGrid control that corresponds to the table:
- NoteIndicator: Indicates (if set to
True
) that the Notes column is displayed in the table - FilesIndicator: Indicates (if set to
True
) that the Files column is displayed in the table
- NoteIndicator: Indicates (if set to