Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10365: Custom subpanels not loading data until the page is reloaded #10366

Open
wants to merge 2 commits into
base: hotfix
Choose a base branch
from

Conversation

pablonr11
Copy link
Contributor

This fixes a bug that makes custom subpanels that uses $this->_focus->id as a function parameter not load correctly

Description

By adding the record Id to the getBean call the data for the current record is retrieved which allows the layout_def custom function to acceed the bean data for building a custom query correctly.

Motivation and Context

This reduces the error margin when creating custom subpanels for modules. Also prevents the user need to reload the page everytime a custom subpanel is opened.

How To Test This

  1. Create a custom layout_def subpanel for any module that uses a custom subpanel to build a query with $this->_focus->id as a function parameter.
  2. Use this parameter in your query
  3. This will make the subpanel not load when opening it for the first time or when trying to order the subpanel by some column from the view.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

…age is reloaded

This bug makes custom subpanels that uses $this->_focus->id as a function parameter not load correctly
@SuiteBot
Copy link

This pull request has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/custom-subpanel-sorting-bug/91946/10

@SuiteBot
Copy link

This pull request has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/adding-records-to-history-subpanel/90101/10

@pstevens71
Copy link
Contributor

If I can add my 2 cents. I just tested this in my dev to fix the sorting of a custom subpanel. So far so good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants