web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to ignore packed/unpacked values in RunBaseBatch class?

(0) ShareShare
ReportReport
Posted on by 1,087

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

*This post is locked for comments

I have the same question (0)
  • syed baber Profile Picture
    11,633 on at

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

    Thanks,

    Baber

  • Verified answer
    vv1984 Profile Picture
    1,087 on at

    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.

  • Suggested answer
    PA-22040759-0 Profile Picture
    6,194 on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans