Help - custom script

Hi ,

The below script is not working for a child table tried a lot on the client ( js side ), could anyone give me the equivalent script on the server side for the py file ,

cur_frm.add_fetch('item_code','rmsec','rmsec');

Thanks

@Muthu please check if your source and target field (which is ‘rmsec’ as per your code) is correct. also keep this code in the beaning of your js file.

Regards
Deep Trivedi

1 Like

@Deep . Yes I already tried all these things , it works perfectly for a master but not in the child table .

Any help ? Thanks

If you are using this for a child table, make sure it’s in the parent’s custom script file.

1 Like

@cpurbaugh . Thanks for replying , I already have kept the script in the parent’s custom script location .Any help ? Thanks

As long as item_code is the field you are trying to fetch from, and rmsec is a field in both the item file and the target, I see no reason why this shouldn’t work.

The only thing that I could think of is the editable grid feature sometimes interferes. Maybe try turning that off and see what happens?

1 Like

@cpurbaugh . Many thanks for the reply tried that now , but it is not working . I am clueless now.

Is there a way that I could achieve this with server side scripting , if so could you throw some light on this ?

Thanks

I’m not very familiar with server side scripting actually. I’ve tried to keep to using client side scripts.

One more thing, what type of fields are rmsec?

1 Like

Many thanks for the reply , both are data fields .

@Muthu, You can also set field value by using Options field instead of add_fetch.
Open child table through Customize Form → Open that field(where you want to set value).
Then, in Options of that field just set item_code.rmsec and type of that field is Read Only.

Thanks, Priya

3 Likes

Many thanks for the reply . I will try .

Thanks