I have created new doctype named “Customer Items” and added table in “Customer”
which has following fields
I want the customer name fetched automatically in table data field"customer_full_name" whenever new row is added.
table name is “Customer Items”
I have written following script in “customer”
suggest the changes
even when other fields of the table are different but customer full name field should be same as the customer name in which this table is created .
link field will give us drop down so every time i have to select the same customer name.
where as i want set it default and whenever new row is added the customer full name field should be same as customer name
@lalnco
I want that table in quotation
for that perticular customer
lets consider if quotation for xyz customer is created then the table of that customer should be fetched in quotation
I have also created same table in quotation by creating new doctype.
bellow script is working but i have to place name of customer in customer doctype for each item
otherwise it will fetch all the rows of different different customer into quotation of that perticular customer.
fabric_inspection_fabrics → this is my child table and “_add” if i suffix it and write method in a child table that method will be triggerd after adding row automatically you can do your hack with it like i did.
I am new for scripting could you please elaborate
with following details.
doctype: Customer
field to be fetch : customer_name
table name: customer_item (in customer)
doctype: Customer Items
field in which name to be fetched: customer_full_name(type=data)
customer itewm table is in customer doctype which has column named customer_full_name.
so in this field the customer_name should be fetched as shown in above screenshot.
I have tried the code you have suggested as follows.
I have tried the script, not working .
I want to pick the customer name and put it in the table it will same for all the items.
table is in “Customer Items” custom doctype, I have used it in customer form same as “Quotation Item” in “Quotation”.