Deluge script to create new record in custom module not working
The below results in an error message when using the API name of a custom module
voidCreate_building_from_name(string Address1,int lead_id)
- building_map = map();
- building_map.put("Buildings_Name", input.Address1);
- building_map.put("Address_1", input.Address1);
- create_building = zoho.crm.create("Buildings", building_map);
- info create_building;
- info building_map;
Results in:
{"code":"MANDATORY_NOT_FOUND","details":{"api_name":"Name"},"message":"required field not found","status":"error"}{"Buildings_Name":"test","Address_1":"test"}
Similarly, it results in the same error message when done this way
- building_map = map();
- building_map.put("CustomModule6_Name", input.Address1);
- building_map.put("Address_1", input.Address1);
-
- create_building = zoho.crm.create("CustomModule6", building_map);
- info create_building;
- info building_map;
-
This is getting very frustrating, especially since I can't also find out why I require underscores for my code to work while all the online documentation doesn't mention this at all. Furthermore, I've seen conflicting information; one side saying use the "CustomModule" name and on the the other, use the API name of the custom module.
Please could someone clear this up for me?
Thanks