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 190
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 225,348 Super User 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 190 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... 284,781 Super User 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.

Helpful resources

Quick Links

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284,781 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,348 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans