8 Replies Latest reply: Jan 15, 2013 12:34 PM by user1348 RSS

    Custom Move Order Form

    user1348
      Hi,
      I am trying to create a custom move order form to allow copy functionality to the user, using the STD form as a template. While copying the move order lines, Locator and Account (to_Account) fields are getting nulled out when it moves to the next record. There are no violations since it takes the same value when I enter it manually. I am wondering if I have to assign values to any hidden fields in addition to what are displayed.

      I found a work around for inserting the account though. I set the header to_account field to the same value before each line and after copying all lines, set the header account back to null and send focus back to header block. Then all the account values stay. (If I dont send the focus back to header block, account gets nulled out too , but only for the last record.) But nothing is working for Locator field. Our locator is a KFF with 3 segments, but we are not using the other 2 segments.

      Please advice.

      Thanks.
        • 1. Re: Custom Move Order Form
          HrishikeshJ
          Hi,

          Yes, you will need to populate details in all the hidden fields (for most of the display fields, there is corresponding id field)
          Typically you will need to populate line_id, inventory_item_id, transaction_type_id, FROM_LOCATOR_ID, TO_ACCOUNT_ID, etc

          Try calling fnd_flex.event('WHEN-VALIDATE-RECORD') after you populate the display field, and see if the corresponding hidden values get populated automatically.

          Hrishikesh
          • 2. Re: Custom Move Order Form
            user1348
            Thanks for the reply. I am populating the Id fields of locator and account. I was asking abt any other dependent fields.
            • 3. Re: Custom Move Order Form
              HrishikeshJ
              Currently what is happening is that Item field (for instance) is still marked as dirty/modified internally, so when you go to next record, it clears the dependent fields.
              Try calling fnd_flex.event('WHEN-VALIDATE-ITEM') after you populate the every display field, and see if the issue gets resolved.

              Hrishikesh
              • 4. Re: Custom Move Order Form
                user1348
                Thanks again. I will try it and let you know.
                • 5. Re: Custom Move Order Form
                  user1348
                  That didn't help. I also tried to compare each field by field (displayed and hidden) while programmatically populating and manually populating. Both shows the same values for all fields, but programmatically populating removes the locator field (and to_account depending if I send focus to main block or not) !!

                  but if the control goes to another record and then comes back to the record and then populate the locator, it stays. So confused..

                  Is there anything to check between locator and to_account?
                  • 6. Re: Custom Move Order Form
                    user1348
                    I added a copy button to copy the current master/detail records to a new move order so that the user can make updates to it and save. It works fine most of the time. But if I copy a value from one of the detail record fields by pressing Ctrl-C (or even right click and copy) and then press copy button, it gives error on a flex field.

                    The error is "This is a read only flex field. You cannot change any values in the flex field."

                    I think the error pops up after populating the inventory item/id field. But I wonder why this error happens only if I am copying something to the clipboard. Otherwise no errors and it populates all the fields properly.

                    Is there a way I can clear the clipboard ?


                    Thanks.
                    • 7. Re: Custom Move Order Form
                      user1348
                      Now I found out that the problem is not because of copying the text to clipboard.
                      If I query the Move Order and click the Copy button (Copy button is in the master block), it copies the data into a new move order and everything works fine.
                      But if I click on any fields in the detail block and then click the copy button, things are screwing up. Something is changing behind the scences when the focus goes to detail block.
                      I appreciate any inputs..

                      Thanks.
                      • 8. Re: Custom Move Order Form
                        user1348
                        May be I can reset the form before copy or something. any ideas?