Populating fileds

Populating fileds

My question is how do you fetch the data from the  CRM  by calling the recorded

Then populating   the a field

Eg

test  =  Test  [CRM_Lookup == "8000210000000000 "];  // do i call name or the id

input.my_input_box = test.field_name_from_crm ;

 

but get the error test.field_name_from_crm dose not exist

How do I know if the lookup has  made a matched ?

is there a simple example to get started using the scripting as i have not found anything

Thanks