2 Replies Latest reply on Apr 20, 2017 5:27 AM by SoundariyaKumar

    Promise and Need by dates set to required

    SoundariyaKumar

      Hi All,

        Our requirement when user sets the transportation arranged field to Buying Organization in terms of a purchase order screen, Promise and Need By dates should turn into required fields.

      To achieve this i added a forms personalization like when validate record trigger on PO_HEADERS block condition to check transportation arranged to Buying organization and the action is setting the date fields required.

      When i enter Buying organization and go into lines block i can see date fields are required fields now (Yellow in color), however without entering values for date fields i am able to save the PO and approve t.

       

      Please share your thoughts.

       

      -- Kumar.R

        • 1. Re: Promise and Need by dates set to required
          anasazii

          these fields are on the lines block and the shipments block...I wonder if you need to set the shipments blocks to required as well?

          Another alternative would be to move your check to when-Validate_record for PO_HEADERS or PO_LINES, if Transportation Arranged = Buying Organization then check for dates and show an error message/don't allow the form to continue on if they are blank?

          • 2. Re: Promise and Need by dates set to required
            SoundariyaKumar

            Hi Anasazil,

               Setting these fields in the shipments block didn't help.

            We cannot set when validate record at header block because error should be thrown only if user misses out on these fields after entering lines.

            setting when when validate record at lines will not work in the following sceanrio,

            when user enters line 1 and then sets the transportation arranged value to buyer then goes back to line and adds new line, so in this error will not be thrown if user enters dates for 2 line but not for 1st line.

             

            But when a field is set to required form should not allow user to save without entering the required fields right?

             

            -- Kumar.R