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

Community site session details

Session Id :
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,

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,825 Moderator 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.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator 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.

  • VoltesDev Profile Picture
    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
    GirishS Profile Picture
    27,825 Moderator 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
    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.

  • GirishS Profile Picture
    27,825 Moderator 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
    on at
    RE: Intellisense not working for LedgerJournalCheckPost object

    Hi Girish,

    Noted. May I know how to do it correctly ?

    Thanks,

  • GirishS Profile Picture
    27,825 Moderator 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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 628 Most Valuable Professional

#2
CU05031448-0 Profile Picture

CU05031448-0 578

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 570 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans