Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Intellisense not working for LedgerJournalCheckPost object

(0) ShareShare
ReportReport
Posted on by

Hi guys,

May I know what happened with this code : 

LedgerjournalCheckPost      LedgerjournalCheckPost;
                   
LedgerjournalCheckPost      =   LedgerjournalCheckPost::newLedgerJournalTable(LedgerjournalTable,NoYes::Yes);
LedgerjournalCheckPost.run();

This statement actually working just fine, no error. It is just when I tried to look for the possible property of that LedgerJournalCheckPost, by delete the ".run()" and once again type "dot", there is no intellisense.

pastedimage1680091148774v1.png

I actually want to add some thing in this statement. I want to let it validate first (I figured by call this with parameter Post to No), if no passed I will throw Exception to add more information ->

pastedimage1680091412123v2.png

 then if it is passed, I call again this LedgerJournalCheckPost with the parameter posting to Yes. I haven't done this before, if someone can advice me the better solution is much appreciated. But the one in question is why the intellisense not working. 

Thanks,

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    There is a lot of validation methods available in LedgerJournalCheckPost class. You can use that methods to validate them before calling run method.

    Thanks,

    Girish S.

  • VoltesDev Profile Picture
    VoltesDev on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    Hi Girish,

    Noted. May I know how to do it correctly ?

    Thanks,

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    if(!journalCheck.run()) method will not return anything as its return type is void. So, this will not work.

    Thanks,

    Girish S.

  • VoltesDev Profile Picture
    VoltesDev on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    Hi Girish,

    Forgive me to asking, is there any return to this check.run() ?

    It is still not working for me after restart Visual Studio as well my VM. Anyway for other object, like Mohit question, the intellisense is working.

    I'm trying to test validate first then run again when the validation passed. May I know if code like this is correct : 

    LedgerjournalCheckPost    journalCheck;
                       
    journalCheck =   LedgerjournalCheckPost::newLedgerJournalTable(LedgerjournalTable,NoYes::No);
                
    if (!journalCheck.run())
    {
            throw error ("Validation failed");
    }
    else
    {
        journalCheck =   LedgerjournalCheckPost::newLedgerJournalTable(LedgerjournalTable,NoYes::Yes);
        journalCheck.run();
    }

    Reason of doing this, is because when I try to run the class with Post and validation failed (cannot post), the error will be catch in the original class (LedgerJournalCheckPost) only, whereby I have my own try and catch during this execution which not triggered when this is failed.

    Thanks.

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    I tried the same. Its working for me. Just reopen the visual studio and check.

    Also build the model and check. 

    6735.Capture.PNG

    Thanks,

    Girish S.

  • VoltesDev Profile Picture
    VoltesDev on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    Hi Girish,

    I did all that, but it is still no intellisense.

    This is after delete and type another buffer name and Build

    pastedimage1680093994791v1.png

    Even now it throw error of the next statement way below it, because I have incomplete statement like this : 

    pastedimage1680094782514v2.png

    pastedimage1680094804301v3.png

    Thanks,

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    Can you check if intellisense is working in standard code. You can try with any standard code, for instance open Insert method in SalesTable table in designer and remove and add dot in this line  if(!this.SalesId).

    If its working then compile your model, otherwise all models. Also trying re-opening Visual studio.

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    Hi VoltesDev,

    Do a build and then try again. Also, don't use the buffer name same as that of class name.

    First change the buffer name for the class and check. If it's not working save the code and try. Also delete the buffer and type in again to see if the intellisense works.

    Thanks,

    Girish S.

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans