Skip to main content

Notifications

Microsoft Dynamics AX forum
Answered

How to ignore packed/unpacked values in RunBaseBatch class?

Posted on by 1,085

Hi,

i have a class called from a button on a form. It takes the current record from Args object.

The class has a dialog method with two fields. I need to set their values with the values of the current record taken from Args.


How do i avoid the packed values and give it the current values each time? I havent find examples around..

thank you in advance

  • Suggested answer
    PA-22040759-0 Profile Picture
    PA-22040759-0 6,194 on at
    RE: How to ignore packed/unpacked values in RunBaseBatch class?

    You can control when unpack (of af RunBase) class is called by calling the getLast method.

    So, if you call this method before applying new parameters to your class, you are able to override the packed values. That would be Best Practice.

  • Verified answer
    vv1984 Profile Picture
    vv1984 1,085 on at
    RE: How to ignore packed/unpacked values in RunBaseBatch class?

    Yes, but somehow it didnt work right.

    I've managed to set that value by overriding the unpack method and by retrieving the values from the PackedClass container.

    Don't know if it's best practice to do this but worked out.

  • syed baber Profile Picture
    syed baber 11,627 on at
    RE: How to ignore packed/unpacked values in RunBaseBatch class?

    Have you tried to set the value in dialog field using dialogField.value() method?

    Thanks,

    Baber

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 227,996 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans