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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Create edit methods in forms Extension

(0) ShareShare
ReportReport
Posted on by 130

Hi All,

I have create Project DICD3FO_VASPackage inheritance Application Suite model

- Add Forms extension LedgerJournalTransDaily.Extension to my Project

- Add DataSource "DICVASFields" to DataSource of Form Extension

- New tab in the Design pattern

- Add some fields of DICVASFields datasource to this TAB

- Input Data Method (DICVASFields_Extension::editAddress) and DataSource (DICVASFields) in to Field (Address) attribute

- Create class Name: DICVASFields_Extension

public static class DICVASFields_Extension
{
           [SysClientCacheDataMethodAttribute(true)]
           public static edit DICAddress editAddress(boolean _set,DICVASFields _this,DICAddress _address)
           {
                LedgerJournalTrans ledgerJournalTrans;
              return _this.setAddress(_set,_address,ledgerJournalTrans);
         }

        }

- Build & Compile everything OK.

- When run form: General journal have the Error Unable to cast object of type 'System.Boolean' to type 'Microsoft.Dynamics.Ax.Xpp.Common'.

Please view this pics in attach.

2185.Pic1.png4251.Pic2.png

 

Please help me find out the solutions

Thanks,

DonTran

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Joris dG Profile Picture
    17,780 on at

    For extension methods, the first argument is the object you're extending. So, your table should be the first argument to the method, i assume dicvasfields is your table...

    Instead of:

    public static edit DICAddress editAddress(boolean _set,DICVASFields _this,DICAddress _address)

    Try:

    public static edit DICAddress editAddress(DICVASFields _this, boolean _set, DICAddress _address)

  • dontran Profile Picture
    130 on at

    Thanks so much : Joris de Gruyter, Everything is OK.,

  • dontran Profile Picture
    130 on at

    Ok Sukrut Parab,, thank for your support.

  • Verified answer
    Martin Dráb Profile Picture
    239,036 Most Valuable Professional on at

    Please use "Did this answer your question? > Yes" to mark verified answers. It will make clear that the question has been answered and how.

  • Verified answer
    dontran Profile Picture
    130 on at

    Thanks Martin,

  • Verified answer
    Martin Dráb Profile Picture
    239,036 Most Valuable Professional on at

    You don't have to thank me. Just please mark the answers.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans