Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 15 replies - 16 through 30 (of 36 total)
  • Author
    Replies

  • shreyas
    Participant

    Hi Team,
    The issue is resolved now.Please find below the process.yml changed file given below:

    After this, i run the command to cache clear & then did: app/console oro:process:configuration:load
    The issue was i had used the attribute as $customconfig instead of using
    $.customconfig

    Now its working as expected.Thanks Team.

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Mike,

    You were Right.The Datagrid Bundle was not extended properly as GridController was missed in Custom Bundle.
    Now it is working absolutely fine.Thanks so much.

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Mike,

    It worked. Thanks a lot for the solution.

    Here i am facing bit issue in routing.yml (In Oro\Bundle\DataGridBundle\Resources\config\oro\routing.yml)where in oro_datagrid_bundle‘s resource parameter value has been changed to Complete path of project folder.If it is kept unchanged to default path i.e @OroDataGridBundle/Controller It throws an exception in browser.

    Please find the below steps followed as per your solution.Let me know if i missed anything:

    Extended Datagrid bundle into a new bundle (CustomSrcDataGridBundle) under location : Proj_Dir\src\Custom\Bundle\SrcDataGridBundle\CustomSrcDataGridBundle.php same as the one you have done for CustomDataGridBundle.php & also the widget view page same as widget.html.twig shown by you to file under loc:Proj_Dir\src\Custom\Bundle\SrcDataGridBundle\Resources\views\Grid\widget\widget.html.twig.

    As per our requirement Lead Records(Datagrid 1) would be shown for particular Account in Account view page & now when a lead is clicked the respective service history (Datagrid 2) specific to that lead has to shown up in Account’s View Page .Please find code snippets given below:
    In CustomAccountBundle View Page under loc:Proj_Dir\src\Custom\Bundle\AccountBundle\Resources\views\Account\view.html.twig

    Here in above code account-lead-grid-internal Datagrid (Datagrid 1) contains list of all leads for the Account viewed.
    Now on click of any Lead displayed through account-lead-grid-internal the event listener displays service history records from service-history-grid3 (Datagrid 2) Datagrid.
    Event Listener for Lead is written in Loc: Proj_Dir\src\Custom\Bundle\OroBundle\EventListener\LeadGridListener.php

    Here leadid is sent to service-history-grid3 Datagrid to display results only to that lead.

    Please find the services.yml file given below Loc in: Proj_Dir\src\Custom\Bundle\SrcDataGridBundle\Resources\config\services.yml

    Please find code snippet for service-history-grid3 given below:

    With all these above steps if i try loading Application . i get exception in browser as follows:

    Please find error screenshot below:
    Error in Datagrid Configuration

    Now when i tried changing Routing.yml present in Location:Proj_Dir\vendor\oro\platform\src\Oro\Bundle\DataGridBundle\Resources\config\oro\routing.yml to given below code, It works:

    Now here Issue faced is that In the code above we have hardcoded the project Directory to : ‘/websites/Proj_Dir/crm-application/vendor/oro/platform/src/Oro/Bundle/DataGridBundle/Controller’ which is not a Good practise as the project directory changes often & each time to remember & change this is difficult process.

    So with the Resource value set to Hardcoded Project Directory Path , the code is working absolutely fine.

    I also tried extending the Datagrid Bundle to a Custom Bundle & Overriding the routing.yml but it also gave same exception.

    Please need help if any suggestions on how to solve this issue.

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Mike,

    Thanks a lot for providing me with the solution.I will get back if any issues.

    Thanks & Regards,
    Shreyas S

    in reply to: Problem in Customizing the field values in Lead Form Type #30431

    shreyas
    Participant

    Thanks Mike for the example . i got it.

    in reply to: Problem in Customizing the field values in Lead Form Type #30429

    shreyas
    Participant

    Hi Mike ,

    Thanks for the Suggestion. i will place it in a custom bundle itself.

    i am just curious & interested in knowing how does it impact the system /( why is it bad practice) if we add custom files inside vendor directory.

    Thanks & Regards,
    Shreyas S

    in reply to: Problem in Customizing the field values in Lead Form Type #30427

    shreyas
    Participant

    Hi Team,

    It worked for me getting the UserIds. In Services.yml i sent a second parameter to search_handler i.e @custom_oro.child.logged.user.provider for setSecurityFacade function of Search Handler.Their i used ChildOfLoggedUserProvider object to retrieve ids similar to one done in LeadType.

    Please find the services.yml file in loc (ProjDir\vendor\oro\platform\src\Oro\Bundle\UserBundle\Resources\config) given below:

    here u can notice to setSecurityFacade in bdc_search_handler i have added another parameter called @custom_oro.child.logged.user.provider

    Please find the BdcUserHandler.php file written in location ProjDir\vendor\oro\platform\src\Oro\Bundle\UserBundle\Autocomplete given below:

    Thanks a lot for your Support team & special thanks to MIKE for helping me with the Solution to this Problem.

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Team,

    I am able to get search with select option using oro_jqueryselect2_hidden wherein i am able to display users in select field box based on the roles . I tried coding similar to the one which is present in OrganizationUsersHandler.php present in location ProjDir\vendor\oro\platform\src\Oro\Bundle\UserBundle\Autocomplete & named a new file named BdcUserHandler.php which has the customized code that gives search result based on roles(here role taken as 2) But i tried using childOfLoggedUserProvider to get all User ids of logged In user but could not.& also registered in services.yml similar to that done for OrganizationUsersHandler
    Please find the code given below for BdcUserHandler.php :

    The ones which are commented for getting childUids are not working.I could not know how to register this childOfLoggedUserProvider to map with BdcUserHandler in Services.yml that is – similar to the one that was mapped with LeadType.php & working fine Done with the help of Mike’s Solution.

    Please find below the services.yml file which has registered BdcUserHandler for autocomplete search to work :

    Now in Lead Type.php located @ \vendor\oro\crm\src\OroCRM\Bundle\SalesBundle\Form\Type\LeadType.php
    i have added autocomplete alias as bdc_users which is defined in services.yml of User Bundle as shown above:

    Please find the LeadType.php In SalesBunle code sample where changes have been done:

    Please find the screenshot given below wherein the roles logic is working fine with search & Select Option Field implementation But i am stuck again in getting ChildUser ids for Logged In Users.

    Customized Field with Search & select options

    Kindly need some suggestions on how to go about with it to get ChildUser ids for Logged In User in BdcUserHandler. Any Resources/guidance would be very helpful:

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Team,

    I tried looking @ getting the Dropdown for Select field for BDC field similar to that of Related Account / Owner , But the problem faced is it is displaying all the users name & not taking the condition given in entity using the CreateQueryBuilder that has to display only selected users as discussed above which works perfectly when i don’t use this autocomplete feature.

    Please find the code attached(Lead Form Type) which i followed bit similar to the existing Account Bundle Form Type , i tried to compare & come with it. i also looked at services.yml of Account Bundle which needs the autocomplete alias to be registered in search Handler,But couldn’t get it Clearly since i am using the User Entity:

    Please check the screenshot of obtained Select Field UI for BDC below:
    Select Field Change for BDC

    I dont know exactly what i am missing here or am i going in correct approach. Kindly need some suggestions/guidance so that i can solve this issue.

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Denis,

    I am very sorry for such a late Response.

    We are not using the Datagrid method now for the Grand totals as explained above & have taken an approach with normal Controller function to get the total from DB Query & print it using Twig which is working fine now.Also as per your previous reply i had only shown in code the only columns that needed to get totals . We will get back once we have a requirement for the totals to be obtained using Datagrid.

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Mike,

    Thanks a lot for your Quick solution again.It Worked as expected.Now i am able to get UserIds.

    I was interested in knowing how to display the Customized result(Secondary Sales person Field / BDC field) similarly to that are shown in Related Account Select Field(search for value / select from options) or Owner Field.

    Customized Select Field Display
    i needed to know how to make the above select field look like the one in Related Account Field given below:

    Related Account Select Field

    Kindly need help in providing some suggestions/sources if it is possible to display as explained .
    i tried looking @ select2 – Jquery but could not get it.
    Please find link given below for select2Jquery:
    https://select2.github.io/examples.html

    Thanks & Reagrds,
    Shreyas S


    shreyas
    Participant

    Hi Mike,
    Thanks a lot for the solution . It helped.

    The issue i had was there was no PHP available in the provided path (usr/local/bin/php) so i removed it from crontab & used only :

    Its working now. Thanks a lot once again .

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Log After lead is created (got this logs when i tried : >tail -f app/logs/dev.log And then created lead):

    I am still trying for some workaround on how to get rid of it.Please let me know if any suggestions/solutions that can help solve the problem.

    Thanks & Regards,
    Shreyas S


    shreyas
    Participant

    Hi Mike ,

    I tried looking at php logs. it didn’t give any exception nor the UI of project_url/cron/job had any exception(Please find the screenshot attached).
    Screenshot of Cron Job Finish status
    i also tried using shell to run daemon using >app/console oro:cron (&) also > app/console jms-job-queue:run but it gave the same problem.
    i also looked at crontab by editing the crontab configuration (crontab -e) to some other project path & done with >service crond restart but it had no effect on the
    cron running in UI . So i clicked on Run Daemon btn in UI, it worked fine by triggering mails & call logs but faced again same issue of cron job stopping after sometime.I am Wondering how crontab configuration change to different path is not affecting this cron job.

    I tried checking with the logs in app/logs/dev.log before & after the creating the Lead to check if any exceptions but couldn’t notice any exceptions occured.
    Please find the log before lead is created:

    Contd with log when lead is created..


    shreyas
    Participant

    Hi Mike,

    Thanks a lot again for providing me with the solution.It Worked.

    Thanks & Regards,
    Shreyas S

Viewing 15 replies - 16 through 30 (of 36 total)
Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No