MattMakris
6 years agoQrew Assistant Captain
QB Action that creates a related record in another table when new record saved.
In our CRM we have the ability to "attach" documents to other types of records such as "client activities". In order to have the ability to related several records to one document, we use the following data storage topology:
Table: "Documents" - this is where we store actual document file, description, etc.
Table: "Document Selections" - this is where we store the relationship between a record in other tables to the document record in the "Documents" table.
Table: "Activites" - this is the table we use in our CRM to log interactions with clients. Users also have the ability to attach/relate an existing document record in the "Documents" table to the Activity record OR have the option to add a NEW Document record that would relate to the Activity record.
My issue is that the current process for creating a new Document requires the user to select the "Related Document" dropdown and scroll all the way to the bottom of the dropdown list to select the "+ Add New Document" option. From here, they open yet another window/screen to upload the document. By now, they have been presented with three different forms.
My attempt at a solution was to add fields to the "Document Selections" form that would allow the user to upload a file and two other fields that mimic that of the "Documents" table. I've been trying to create an action that would copy these fields to the "Documents" table, which works, but does not then write the "Documents" `Record ID #` to the `Related Document` field back to the original "Document Selections" record that triggered the action originally. I tried creating a similar action in the "Documents" table that looked for a new "Documents" record with a static numeric field called "Related Document Selection (static)" that contains the `Record ID #` of the original "Document Selections" record that was created, however, this ends up creating a NEW "Document Selections" record, rather than updating the current record.
Any help on this would be much appreciated, thank you!!
------------------------------
Matt Makris
------------------------------
Table: "Documents" - this is where we store actual document file, description, etc.
Table: "Document Selections" - this is where we store the relationship between a record in other tables to the document record in the "Documents" table.
Table: "Activites" - this is the table we use in our CRM to log interactions with clients. Users also have the ability to attach/relate an existing document record in the "Documents" table to the Activity record OR have the option to add a NEW Document record that would relate to the Activity record.
My issue is that the current process for creating a new Document requires the user to select the "Related Document" dropdown and scroll all the way to the bottom of the dropdown list to select the "+ Add New Document" option. From here, they open yet another window/screen to upload the document. By now, they have been presented with three different forms.
My attempt at a solution was to add fields to the "Document Selections" form that would allow the user to upload a file and two other fields that mimic that of the "Documents" table. I've been trying to create an action that would copy these fields to the "Documents" table, which works, but does not then write the "Documents" `Record ID #` to the `Related Document` field back to the original "Document Selections" record that triggered the action originally. I tried creating a similar action in the "Documents" table that looked for a new "Documents" record with a static numeric field called "Related Document Selection (static)" that contains the `Record ID #` of the original "Document Selections" record that was created, however, this ends up creating a NEW "Document Selections" record, rather than updating the current record.
Any help on this would be much appreciated, thank you!!
------------------------------
Matt Makris
------------------------------