2 Replies Latest reply: Mar 25, 2014 1:38 AM by Pars RSS

    How can i make rows readonly based on condition in Master-Detail (2 windows form)

    839839

      Hi,

       

      I am new to Apex and am trying to do the following but keep ending up at square one. the problem is this

      I have a master-detail (2 window form- Page 200 and 201 respectively) , the user should only be able to edit the last row in Page 201(the detail page) based on a certain condition. All other rows except the last one should be read-only.

       

      I implemented this functionality using a 3 window form but it needs to be accomplished with a 2 window form.

       

      Please help!!

        • 1. Re: How can i make rows readonly based on condition in Master-Detail (2 windows form)
          Danny*D201

          I think this is another X-Y question..but anyway,

           

          is the last row in page 201 an existing record in the DB?

          would you consider alter the design of p201 have separate reagions of the readonly and editable rows? easier this way.

          if not, you got 2 options, i think.

          1, build manual tabular forms (look into APEX_ITEM package) and make rows readonly from the source(give them readonly html attributes), CASE on the P200 condition.

          2, use Javascript/Jquery to make rows readonly after loading the page and checking the condition on P200

           

          I know this is not a real coded solution, but hopfully get you thinking of the solution/design a bit more before fixed into the coding.

          • 2. Re: How can i make rows readonly based on condition in Master-Detail (2 windows form)
            Pars

            if you want to all rows of tabular form in readonly mode except of new row created

            then create dynamic action on page 201 like below:

            Dynamic Action:

            Event: Page Load

            Condition: No Condition

            Action : Execute Javascript Code

            Fire on Page Load : Unchecked

            Code:

             

            $('input').prop('readonly', true);
            

             

            selection Type : Region

            Region: Select Region name

             

            Hope This Helps...

             

            Pars.