Forum Discussion

Former_Member's avatar
Former_Member
Ideator I
7 years ago
Solved

How to edit code for submit on Project form?

Hi Team, I want to modify code for highlighted red section. I tried to find the function for same but I dint find and also din't find button on form(PM_projectOnAdd). Any one can please he...
  • christopher_gillis's avatar
    christopher_gillis
    7 years ago

    There's two ways to achieve that.

    The first would be to simply flag your new property as Required on the Project ItemType. This won't prevent users from closing that initial dialog, but it will prevent users from saving and actually creating the new Project from the main form. The Project isn't actually saved to the database when you click the green check mark on the dialog. The fields required there undergo additional validation for the purposes of calculating the schedule of the Project.

    If you have good reason to require the field specifically on that dialog, you can find the file in your installation directory (By default C:\Program Files (x86)\Aras\Innovator\) under \Innovator\Client\Solutions\Project\scripts\addProjectDialog.html. You can edit the function sendData in this file to perform a validation check. The beginning of this function already performs validation checks for other properties, so you can base your own check on those.

    Chris

  • christopher_gillis's avatar
    christopher_gillis
    7 years ago

    Hello,

    What you're describing is the expected behavior of marking this new field as Required. The user will still be able to close the first dialog, but they will not be able to save the Project from the main from. The Project is not saved to the database when the initial dialog is closed, so this functionally meets the requirements but may be confusing to users. This means that you're likely better off changing the file in the codetree.

    Could you confirm that you have cleared your browser cache after making this change to addProjectDialog.html? It's possible that an old, cached copy of the file is still being used when you open a project. If you can confirm it works after clearing your cache, you can force all of the client machines to use the new copy of this file by following the steps below.

    1. Navigate to \Innovator\Client\web.config
    2. Open this file in a text editor
    3. Near the bottom find the <cachingModule/> XML tag
    4. Update the filesRevision attribute and increment it's value by 1
      1. std->2->3->4->etc.
    5. Save the file

    Chris

    Christopher Gillis

    Aras Labs Software Engineer