Virtual doctype sidebar, assigned to, attachment, tags and share how to use

On virtual doctype there the left sidemenu when you open a doctype which contains assigned to, attachment, tags. When i try to add an attachment or assigned or even tags i get an error pymysql.err.ProgrammingError: (1146, “Table ‘_49f5b37e2639bf92.tabOrder Schedule’ doesn’t exist”)

I understand this is because virtual doctype dont have a database table attached to them. On the example doctype provided on the documentation it contains which am using to override things like listview data etc

@staticmethod
def update_data(data: dict[str, dict]) -> None:

def db_insert(self, *args, **kwargs):

def load_from_db(self):

def db_update(self, *args, **kwargs):

def delete(self):

@staticmethod
def get_list(args):

@staticmethod
def get_count(args):

@staticmethod
def get_stats(args):
    return {}

Which option can i use to set these options for the sidebar. If someone has an example of this would be very helpful

I am also interested in the answer to this question. If someone can post a short example, it would be extremely helpful because (despite searching) I am unable to find an answer for this…

Hi @naveedpash:

Assignments, tags, etc … are closely related to Frappe db table structure.
It would be pretty difficult to override this, since there are not “controller” methods for that.

1 Like

Thank you so much for responding.

I think this is a very important detail and should be mentioned in the Frappe Documentation, which currently states that “The frontend for Virtual DocTypes remain unchanged” and even includes a screenshot where the doctype is assigned to a user.

For now, I will keep my virtual doctype as a child table in a regular doctype as a workaround. I have also commented on the relevant GitHub issue.