How can I make the details append to the bottom of the page. Do i need to add any custom fields for that? Please help me with that.
And why is that button on the top right corner? can i make it to the bottom of the page?
@ninjas005 If you want to set student_full_name on Student form on selection of student_id(User).
Then you have to add custom field on student form like ‘Student Name’ and use add_fetch method for fetching details from User form.
Example : cur_frm.add_fetch(‘user’,‘first_name’,‘student_name’);
I can also do it by making “Student Name” read only and setting option to user.first name.
But it makes a new column in the Student table. That is not what I wanted.
The problem with that is when ever I change the value of some fields in user doctype, the student doctype wont get updated. It will have the older value . plus we don’t want to save the same data in different tables.
I think you didn’t get it.
I have a Student doctype having field user that links to user doctype.
I need to display the details in the user doctype like email,gender etc in the students form.
@ninjas005 Html field would be best if you don’t want to save values in form.
I think you are asking for code to show value in html field.
You can refer this code, here my_html is custom field added to customer doctype.
I am assigning “Student info” to my_html field.
You can write any html code and show it into form.
I placed this code in Custom script for doctype
My particular case:
Source DocType: Customer
Source field is a custom field with following options: Label: TIN Type: Data Name: tax_id Mandatory: Checked
This field contains data, and can also be seen as column header in Report for each “Customer”, so one can select it as a column.
Target DocType: Sales Invoice Label: TIN Type: Data Name: tax_id Mandatory: Unchecked
Desired behavior: When NEW Sales invoice is created, upon selection of Customer, a custom field in Sales Invoice labelled: TIN should be updated automatically with the data for the corresponding selected customer. The field can be read only. It should update automatically, each time a new customer is selected.
For a Sales Invoice created from a Sales Order or similar, when the NEW Sales Invoice is created, the same behavior is desired. And for each time a saved “Draft” Invoice is opened, the TIN should also load automatically.
SOLUTION FOUND: I managed to use the solution as described in the Custom Script Help when entering Setup>Custom Script>New. I used this version: // fetch local_tax_no on selection of customer // cur_frm.add_fetch(link_field, source_fieldname, target_fieldname); cur_frm.add_fetch("customer", "tax_id", "tax_id");
Pending Problem: If created after several sales invoices have been created, it will only work with the NEW invoices, or by editing each one, reselecting Customer, and then the field will fill itself on its own. Once you save the invoice, the data is now saved with it. It would be great for it to be retroactive to previously created Sales Invoices (prior to new custom script)
I want to ask one question. I just create a new doctype name “Vehicle Info” which i add as a child table in the “Customer” doctype.
Also i added link field in Sales Order/Invoice. What i need is when i select a customer in sales order/invoice I just want to get the vehicles info which is related to the customer in the created link field.