I have added an custom field called maintenance_fee into Item table. I want the data of this field to go automatically into the Sales Order Item when I select the item in a Sales Order. I have added a field with the same name (maintenance_fee) in Sales Order Item table, but I am not sure what to do in order to copy the field from the Item table when someone select the item in the Sales Order.
I tried but it doesnât work. The field being copied is at the Sales Order Item level. Does it matter?
I have tested the method on the Sales Order level where I copy one of the field from Customer table and it works. But the same method doesnât work on the Item where it can not copy a field from the Item table when I select the Item.
Or is there anywhere I can check why it doesnât work?
I added a custom field called maintenance_fee in Item Form. And I also added a field called maintenance_fee in Sales Order Item Form which is a read only field with the option of item.maintenance_fee. When I create a new Sales order and adding new item into the order, the maintenance_fee is not populated to the item I select.
I am quite sure I did the right way as I have tested this on the sales order level where I am able to populate a field from the other table.
Putting item_code.maintenance_fee in options does not work in child table. If you foolow the second method, it will work. That is create Custom Script for Sales Order and write following code: cur_frm.add_fetch("item_code", "maintenance_fee", "maintenance_fee")
Hi,
I have created a custom data field (po_no) on my Sales Order Form.
then i have created similar custom data field (po_no) on my Sales Invoice Form
How can i fetch the value from my Sales Order field to my Sales invoice field ?
Thx
Based on the above discussion I have created two custom fields item location in Item form and also in âSales Order Itemâ form. In addition to this I created a Custom script having this cur_frm.add_fetch(âitem_codeâ, âitem_locationâ, âitem_locationâ) and linked it to the Sales Order Item Doc Type. But unable to see the location populated when I add an Item in Sales Order.
My requirement is to add the Location of the Stock item on the Rack and then when the sales order item is generated it should be visible in the table so that based on the sales order list, someone can pick the right item from correct stack instead of them having to know the location of every single item.
@nabinhait if I am not mistaken the âFieldnameâ is generated automatically from the âLabelâ. Isnât that so?
So, if that above is true youâd have to name the âLabelâ in the exact same way as the field you want to grab the data from, right?
Second question ⌠do you have to mark the field that grabs the data from the linked field as âread onlyâ?
3rd is rhe field that us created at first automatically the âbossâ in the hierarchy of the 2 linked fields?
While generating the Custom Field noticed that the field name is generated from the Lable in lower case with whitespace replaced by _. So in case your lable is âItem Locationâ, the field name give by the system is item_location.
This is just an observation, some one could confirm this.
Finally was able to Obtain the Value. Posting the exact steps followed for anyone who needs to do this.
Create the Custom Field âItem Locationâ under Doc Type Item
Create the Custom Field âItem Locationâ under Doc Type âSales Order Itemâ
Create the Custom Script under doc type âSales Orderâ (Note that it has to be created under âSales Orderâ was able to reach this conclusion based on the following issue link
Thats all it takes to display the Custom field in the Sales order form based on data entered in Item form.