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 :
Microsoft Dynamics AX (Archived)

How can I automatically click on a prompt on SalesEditLines form?

(0) ShareShare
ReportReport
Posted on by 2,894

Hi, I'm on DAX 2012, and I'm doing some modifications in the SalesEditLines form, when I'm going to pick a sales order, I click on the button "OK" at the bottom of the form, and I get this:

[IMG][View:http://i45.tinypic.com/2qwkmt0.png][/IMG]

How can I click on "Yes" button in the prompt, by code? I already did an override on the click event for the OK button and tried to use a Macros to simulate an Enter on the keyboard, but it does not work, is there any way to do it? Thanks!!

*This post is locked for comments

I have the same question (0)
  • dolee Profile Picture
    11,279 on at

    Hi,

    If you are going to force an "Ok", then why not edit the code to skip this prompt instead? (maybe under some condition base on your modification.)

    Cheers

  • saman0suke Profile Picture
    2,894 on at

    I haven't been able to find where this prompt is being created, the SalesEditLines form is a "system" form, and it goes through many classes, methods, I tried to debug it to see where it was being generated, but I haven't had any luck so far, thanks!

  • Kambiz Nasehi Profile Picture
    30 on at

    By doing setup a printer (using "Printer Setup" button) to print out to some where rather than the screen you will get out of this warning. At the same way, in case the print out goes to screen for copy or original print the printout is always "After" which you can change it to "Current" as well.

    As a thought, by modifying the errors and warning specially while are working in posting journals environment you are about to violate the user actions so I do not recommend to do this but there is way to do so.

  • saman0suke Profile Picture
    2,894 on at

    I understand this might not be a good way to avoid prompts, however I've been asked not to use this prompt, and the report has to be printed in the screen, instead of another output.

    If I change the print from "After" to "Current" I get a warning that says "Current is not allowed when printer settings are set to a client target". Any ideas? thanks!!

  • Kambiz Nasehi Profile Picture
    30 on at

    In here, "Not to use this prompt" or "automatically click on" overall means that "avoid prompts" as long as you are about to bypass a user action and notice !

    "Connect to printers on this server" can be set in the Microsoft Dynamics AX Client Configuration Utility.

    Anyway, such this warning message comes from a derived controllers class.A container that contains a "SrsReportPreRunState" enumeration value along with a message to display to the user. You might take a look at "preRunValidate" method inside "SrsReportRunController" and (in this case)  "ProdPickListController". However  a common use of this method is to validate whether the time taken to run the report is accepted, however could be a start point for tracking.

  • dolee Profile Picture
    11,279 on at

    Hi Sam,

    The code which trigger this dialog appears to be in \Classes\SalesFormLetter\validate method. Unless you need to override this behavior in all types of postings, modifying the override at the subclass (or create an override if there isn't one) can be a better option.

    FYR, I found this location by:

    1) Look for the Label ID for the prompt using Label Editor.

    2) Once found, click "Used by" button on the Label Editor

    3) Only one entry found using this label!

    When the cross reference works so well, it's a beauty isn't it? =D

    Cheers

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans