This content has been marked as final. Show 8 replies
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.
Thanks for the reply. I am populating the Id fields of locator and account. I was asking abt any other dependent fields.
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.
Thanks again. I will try it and let you know.
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?
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 ?
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..
May be I can reset the form before copy or something. any ideas?