Giter VIP home page Giter VIP logo

Comments (7)

siddhant-mohan avatar siddhant-mohan commented on September 18, 2024

I debugged it little more and found out that in gems/rubyzoho-0.5.0/lib/zoho_api_field_utils.rb:73

    70:   def create_and_add_field_value_pair(field_name, module_name, n, record)
    71:     debugger if module_name == "Invoices"
    72:     k = ApiUtils.string_to_symbol(field_name)
    73:     v = n.text == 'null' ? nil : n.text
    74:     r = record.merge({ k => v })
    75:     r = r.merge({ :id => v }) if primary_key?(module_name, k)

In create_and_add_field_value_pair method, its just assigning the n.text to v if its not null. But in my case n is

<FL val='Product Details'><product no='1'><FL val='Product Id'>1496038000000671051</FL><FL val='Product Name'><![CDATA[AWS Core Service]]></FL><FL val='Unit Price'>1.0</FL><FL val='Quantity'>22.0</FL><FL val='Quantity in Stock'>-269.0</FL><FL val='Total'>22.0</FL><FL val='Discount'>0.0</FL><FL val='Total After Discount'>22.0</FL><FL val='List Price'>1.0</FL><FL val='Net Total'>22.0</FL><FL val='Tax'>0.0</FL></product></FL>

which gives n.text = nil and thus product_details value comes out to be nil everytimes.

from rubyzoho.

amalc avatar amalc commented on September 18, 2024

from rubyzoho.

siddhant-mohan avatar siddhant-mohan commented on September 18, 2024

Yeah will send the PR in some time.

from rubyzoho.

jheth avatar jheth commented on September 18, 2024

The same issue exists trying to get product_details from a Quote, which I just ran into.

from rubyzoho.

amalc avatar amalc commented on September 18, 2024

PR was integrated. Can you point to the master branch and try it?

from rubyzoho.

jheth avatar jheth commented on September 18, 2024

@amalc I tried on master and still not seeing Quote#product_detail records.
RubyZoho::Crm::Quote.first.product_details => nil
ZohoApi::Crm#related_records('Quotes', '{id}', 'Products') => 200

from rubyzoho.

amalc avatar amalc commented on September 18, 2024

@jheth Hmm. OK. Let take a look.I had this problem on our instance a couple of year ago and fixed it but I don't think it was in the Gem. Something, if I remember correctly, with permissions.

from rubyzoho.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.