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 #560 - removed equality check between fieldKey and name in return condition of addFieldDepedency() to allow addition of the field itself as a dependency #561

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

xkrdudrlf
Copy link

Description

This PR will close #560

Enable an user to add a field as its own dependency under displayLogic, so that a field display can change based on a value of the field itself.

Motivation and Context

In my project using CRM, I have a field which requires to adjust its display type based on a value of the field itself.

How To Test This

For any field, configure the field itself as a dependency such as follows as an example:

$dictionary['Lead']['fields']['status']['displayLogic'] = [
    'readonly_when_converted' => [
        'key' => 'displayType',
        'modes' => ['edit'],
        'params' => [
            'fieldDependencies' => [
                'status'
            ],
            'targetDisplayType' => 'readonly',
            'activeOnFields' =>  [
                'status' => [ 'Finished' ]
            ]
        ]
    ]
];

Types of changes

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

Final checklist

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

…me in return condition of addFieldDepedency() to allow addition of the field itself as a dependency
@SuiteBot
Copy link

SuiteBot commented Oct 28, 2024

CLA assistant check
All committers have signed the CLA.

@xkrdudrlf
Copy link
Author

xkrdudrlf commented Nov 7, 2024

@jack7anderson7 @clemente-raposo

Sorry, I had forgotten to link an email in my codespace to my actual github account, so I've just done it and this PR is ready for a review now.

Thank you :)

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.

Allow addFieldDependency() for displayLogic to include the field itself as a dependency
2 participants