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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Error message suppression

(0) ShareShare
ReportReport
Posted on by 1,215

Hi,

Greetings!

I have created a CoC method and in there I am handling an error generated by the standard code.

But, the standard code generates an error message which is no longer needed.

Can we hide or suppress the error message?

With best regards,

Abhinay

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Abhinay,

    Normally you can't suppress error messages thrown from the standard code as standard code is always going to be executed. However, if the error message is being thrown based on a certain condition, you might be able to set some values so that the condition evaluated to false and the error message is not thrown.

    Could you please share the standard code where the error is being thrown so that we can check if this will be doable?

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi Gunjan,

    Thank you for your reply.

    Unfortunately there seems to be no condition to control it.

    ProjTable::generateNextSubProjectId

    Inside this method 

    NumberSeq::numInsertFormat

    then 

    NumberSeq::numInsertFormatV2

    and 

    NumberSeq::numInsertFormatInternal

    And I do not want to change the behavior of the number sequence related code.

    With regards,

    Abhinay

  • Verified answer
    Martin Dráb Profile Picture
    237,805 Most Valuable Professional on at

    You can remove messages from infolog. For example:

    int infoLine = infologLine();
    
    ...
    
    infolog.clear(infoLine);

    But you must be careful - removing all messages may easily be wrong. Even if the current standard code can ever add just the one error message that you want to supress, this may change in any future version. Also, we're talking about CoC, therefore the 'next' may call many other extensions of the same method, and you don't know what they'll be doing. You could hide crucial messages by mistake.

    You could make it safer by checking which messages were added and then removing just the one you're interested in. But I think a better approach is making an extensibility request and ask Microsoft to make it possible to skip the code that you don't want to run.

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Hi Martin,

    Thank you for the suggestion and I will keep these pointers in mind.

    With regards,

    Abhinay

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans