ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 2 replies, has 2 voices, and was last updated by  shreyas 11 months, 1 week ago.

  • Creator
    Topic
  • #23175

    shreyas
    Participant

    Hi Team,

    I am writing a custom report. I am trying to use a stored procedure in a controller function. when i call the stored procedure i am able to get result in controller when i debug the array obtained using print_r().Even when i send this array to twig template i am able to get result as needed.Now when i extend the index twig page from OroUIBundle i.e ({% extends ‘OroUIBundle:actions:index.html.twig’ %} )it throws an error.

    Please find the Controller function used to call stored procedure and send result to twig file:

    Please find the twig file used to access the data:

    Now using this file when i try accessing the Stored Procedure , i get the error as

    Please find exception details thrown in given below screenshot:
    Error FOr Stored Procedure

    Now if i comment {% extends ‘OroUIBundle:actions:index.html.twig’ %} in twig above , i get expected result in plain browser page.i am not sure on how to use stored procedure in OROCRM so that i can extend UIBundle index page to get default OROCRM style page.Please need help in how to solve this issue.

    Thanks & Regards,
    Shreyas S

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #23217
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    There are many variants resolving our problem. Please tell me later, which approach will help you.

    #23498

    shreyas
    Participant

    HI Mike,
    Thanks a lot for sharing the link . It worked. From the link both Solution 1 & Solution 4 were suitable for our Stored Procedure. i.e 1) using of closeCursor() (or) 2) using of unset() .

    Please find the working code snippet shared for the same:

    From the code above any of the two solutions(using unset / using closeCursor) can be used to deal with the exception occured.
    Thanks a lot for the help again!

    Thanks & Regards,
    Shreyas S

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.