rubyzoho
rubyzoho copied to clipboard
Custom field names
Sorry to open yet another ticket about custom field names, I see there have been a few previously but they are marked resolved yet I am still experiencing issues.
I have a field named 'Price ex GST' which I can't set the value of (x.price_ex_gst = "123"). When I change the field name to 'Price Ex Gst' it works fine. I need it to work with the current field name in production otherwise it will break legacy code.
I see in the previous issues there was mention of mapping the field names correctly to account for differences in capitalisation but that doesnt seem to be working for me. I'm using 0.5.0 straight from RubyGems
Is there some way I can fix this? I am happy to hard code the field name mapping in the initialiser if required.
Any suggestions @amalc?
Sorry. I thought I had responded. But didn't.
The field needs to end up being a legal Ruby variable name in all released versions. The master branch does have a fix on which maps Zoho names to legal Ruby variables and back but I have not had a chance to test it. Want to try it? And o can work with you to fix any bugs.
It works perfectly! No matter the case of the field name it updated the field correctly. I even tried weird case such as "prICe ex GsT"
Thanks for the assistance!
I have created a custom field Project Id and tried to put the data to it.
RubyZoho::Crm::Lead.update({id: "1877296000004683113", project_id: "12345"})
The operation was succeful, but it didn't change the value. I saw many comments about this problem, but did not find the solution among them.
UPD The field is string type, of course.
UPD 2 Empirically it has been proved that the field containing "ID" in the name aren't syncronized. Just "Project" works fine.