What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

I have defined the method getFactory and getFacade above class and when i'm using getFactory it is n

Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet
edited April 2023 in Help

I have defined the method getFactory and getFacade above class and when i'm using getFactory it is not reaching in the function but the control mousclick gets the path but it is not working.
return $this->getFacade()->exportCustomer($dataExportConfigurationTransfer); this line is not working

Welcome!

It looks like you're new here. Sign in or register to get started.

Comments

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    How should return $this->getFacade()->exportCustomer($dataExportConfigurationTransfer); work, there is an earlier return statement on line 49, so your expected return is never reached

  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    Sorry , i am just testing that but previously getFacad() not working but that object initiation one with new keyword working fine..

  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    But currently it is as same Then also it is not working

  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    I commented there lines before , but getFacade , getFactory is not working all that method we defined on above of class using @method is not working for me

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    As you extend the AbstractPlugin there is no need to get the factory first, $this->getFacade() should work fine.
    Is it the right AbstractPlugin you are extending (Spryker\Zed\Kernel\Communication\AbstractPlugin)?

    The AbstractPlugin has the FacadeResolverAwareTrait which exposes the getFacade() method.

  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    No , i am using another AbstractPlugin

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    Then either use the correct one or use the FacadeResolverAwareTrait directly in your class.
    But I'm pretty sure the solution is to use the right AbstractPlugin. Which one you are using?

  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes now it is working but in my Facade getFactory is not working πŸ˜‘

  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet
  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer
    1. you should extend the SalesDataExportFacade from Spryker or you lose all the methods that are already implemented in the core (spryker)
    2. Is there any error message hinting that getFactory isn't working, the code looks fine to me
  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    i am working on customer data export so i run that through command line so i didn't get any error.

  • Lead Spryker Solution Architect / Technical Director Posts: 690 πŸͺ - Explorer

    But when you are working on CustomerDataExport (module I assume), why do you use the SalesDataExportFacade?

  • Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    Sorry , i posted wrong screen shot i am working on CustomerDataExport

Welcome!

It looks like you're new here. Sign in or register to get started.