Support Article
DateTime control with custom format get corrupted on refresh
SA-27291
Summary
Developer has created a section (A) which internally includes 2 sub sections( B and C).
In both the included section, they have configured a pxDateTime control to "display value using read only formatting" and a custom format (say dd.MM.yyyy).
Section B has a button (Refresh) configured with refresh section event.
During run time, when users are selecting values for both the DateTime controls (present on Section B and C) and then clicks on "Refresh" (from section B), the custom format from the dateTime control present on Section C disappears.
Error Messages
Not Applicable
Steps to Reproduce
1. Create 3 sections (A, B and C).
2. Include a pxDateTime control in both Section B and C.
3. Configure this pxDateTime control to "display value using read only formatting" and a custom format (say dd.MM.yyyy).
4. Include a button( say refresh) in Section B.
5. Include both Section B and C in Section A.
6. Run section A and select some value for DateTime controls.
7. Click on Refresh button and check the format of Section C's DateTime control.
Root Cause
A defect in Pegasystems’ code or rules. The issue in processOnBeforeSubmit API where before submit/reload of section, user resets the value of datetime control to it unformatted value.
When this API is called before any reload sections, instead of fetching datatime controls within the section, user is trying to get all the datatime elements in the harness.
Resolution
Apply HFix-28650.
Published September 21, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.