- UIDocument is invoked from frontend , while Document from backend.
-UIDocument is the document currently openning.
-Currently inputing field values which are not saved yet , can be accessed via UIDocument , but not for Document.
-if series processes are needed over a current document , we can use UIDocument . While , if same processed are needed for a batch of documents , we use Document.