Hi all,
I am new to ERPNext/Frappe and I’ve been trying it out for a project. Just came across one particular issue and I’m not sure if I should be posting it in the Frappe section or the ERPNext section. Hope you’ll excuse me if it is the wrong section.
I am trying to fetch the document ID from one doctype to another doctype (the document ID is generated in the source doctype with a naming series option (field name is naming_series). Please see the image below.
When I try to fetch it in the destination doctype, with a connected link field, it only shows me the naming series format, instead of showing the actual entry ID.
In the image above, the “Something Student Name” is linked to the “Student” DocType, which is the source doctype. I’m sure I’m doing something wrong, but some help in the right direction would be very much helpful.
Thank you and warm regards,
Finny
Hii @fbcudaipur
You can add search field in Customize Form for student doctype, add naming series field name like
employee_name, series
after this you can find student by entering naming series in every link field where you linked student doctype
also you can set title for link field from view setting in Customize Form
Hi @nilpatel42,
Thanks for the reply and suggestions. And thanks to the moderators for approving my post.
Just to provide a bit of additional info. I am actually creating a custom doctype, which is ok for me, as I am not looking to deploy the app anywhere else, and I need it only on this instance.
And I need the unique ID generated by the naming series (is it ok if we call it an Unique ID–I couldn’t find anything in the ERPNext docs about that) to be shown in the form view while I am fetching the data, and also when it is saved. I know that the document will be linked to the master doctype anyway, but I need that particular field to be shown here in the entry as well. Currently, I only see the naming series entry in the field when I select a student in the link field. Please see the screenshot below:
Hope it helps. Also, if I may add another query to this:
Is it possible to place a new doctype in an existing section? Currently my custom doctype shows up under “Custom Documents” section in a module. But I would like to place it under maybe something like the “Student and Instructor” section.
Thanks again, for all the help and support.
Warm regards,
Finny
For your first problem, i don’t have any easy and perfect solution, i think this problem is only solved by client script (if i will find solution, i will share with you)
for second one
you can edit standard card via workspace edit button
- Click on pen icon
- Add row in cards links, you can add page, doctype and report also
Hi @nilpatel42 and @NCP,
Thanks for your kind response and the directions pointed. I will definitely look out for that going forward. Found a way to implement this without a client script actually (which I was a bit keen on, to avoid any future ERPNext update breaking anything). I unchecked the “Show Title in Link Fields” option using Customize Form and then added another link field to show the name. That way both the ID and the Name show up in the doc entry.
I had just one more question. I am using the education module and there is a Single doctype which is a Student Report Generation Module. But that can’t be customized even using the customize form option, but I need to remove the “Parents Teachers Meeting Attendance” and “Student Attendance” section shown in the doctype, as that is irrelevant in many scenarios and it looks bad when printing out.
It looks like this in the generated PDF.
Is there any way to remove that or optionally hide that without going into the code? I tried duplicating the doctype but that only gives the option to “save” and not to “Print a PDF”?
If none of these is possible, is it possible to create a custom doctype that fetches a list of entries from another doctype for a particular student using the student as a link field, in a table format?
Thank you, once again, for your kind help and amazing support.
Warm regards,
Finny