Getting error "AttributeError: 'NoneType' object has no attribute 'options'" on clicking button to append data in child table

there is a button “Get Item From” in a doctype A which brings item from another doctype B into the child table. i have done it by calling the method and using source-target method; but on clicking an error is coming , not able to troubleshoot help me out.
Screenshot_2020-03-30%20d80d2e99a0

Which doctype is this occuring on and on which button within “Get Items from” ?

i have this doctype name “RMRD” which has this button “Get Items from” --> “Van Collection Items”.
i have attached the screenchots.

this is most likely you referring an object/variable in server side script which has not yet been created or have any value assigned.

in your js script, try calling frappe.client.get and printing the value to make sure the js side works,
if it works, then inside your python func, try printing a message to see if the func gets called