Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / BPWarningDisplayMethod...
Finance forum
Suggested answer

BPWarningDisplayMethodUpdateUnpredictable: The display method in Form may not update as expected

Posted on by 254
Hi,

I got this BP warning:
BPWarningDisplayMethodUpdateUnpredictable: The display method 'test' in form '$testForm' may not update as expected

i'm getting the BP warning on the 2 display methods test() and test1()
[Form]
public class TestForm extends FormRun
{
    ClassTestContract   classTest;
    

    /// <summary>
    /// init
    /// </summary>
    public void init()
    {
        classAContract classA;

        super();

        classA = element.args().parmobject() as classAContract;

        classTest = classA.parmClassTestContract();
    }

    public display boolean test()
    {
      return classTest.parmX().parmY()? true : false;
    }

    public display boolean test1()
    {
        return classTest.parmZ().parmY();
    }

}

How to fix it?
  • Martin Dráb Profile Picture
    Martin Dráb 228,353 Most Valuable Professional on at
    BPWarningDisplayMethodUpdateUnpredictable: The display method in Form may not update as expected
    The warning tells you that you may expect display values being updated when parmX(), parmY() or parmZ() starts returning a different value, but it won't happen, because you haven't implemented such a logic. The values will be obtained just once. The system can't say whether it's the behaviour you want or not.
  • CU04051814-0 Profile Picture
    CU04051814-0 254 on at
    BPWarningDisplayMethodUpdateUnpredictable: The display method in Form may not update as expected
    Hi Andre,

    do you mean to set the value of the unbound control in the init method of the form??

    and normally if there is a display method, then it should be put in the form datasource instead of form?
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,451 Super User 2024 Season 2 on at
    BPWarningDisplayMethodUpdateUnpredictable: The display method in Form may not update as expected
    Hi,
     
    You get this warning in case the display methods are created on the form instead of a form data source. In case the information is retrieved only once when opening the form, you can better use unbound controls and fill the values by setting a value for these controls.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,451 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,353 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans