You need to sign in to do that
Don't have an account?
juysolutions
Platform Bug when rerendering a PageBlockTable with InputFields
I built a page/controller where Users can Add, Edit and Delete rows to a Custom Object in Salesforce. It is very straightforward as shown below:
Everything works fine except when the User deletes a record in between. Below I deleted the 3rd row "Furniture/Millwork" and notice that the 'Level 2' and 'Level 3' columns changed for the last row "Local Costs".
What's even odd about this is that these are dependent picklists - meaning, that the "Local Costs" as 'Level 1' SHOULD NOT even have "Site Preparation" as 'Level 2' NOR even have "Hoarding" as 'Level 3'.
I noticed a similar bug when there is a Lookup Field on the page. The whole row gets deleted except for the Lookup Input field.
Does anybody have a similar problem? A Senior Architect may be able to help and explain what caused the problem. Please feel free to request for the code if you can't replicate the issue on your own project.
Everything works fine except when the User deletes a record in between. Below I deleted the 3rd row "Furniture/Millwork" and notice that the 'Level 2' and 'Level 3' columns changed for the last row "Local Costs".
What's even odd about this is that these are dependent picklists - meaning, that the "Local Costs" as 'Level 1' SHOULD NOT even have "Site Preparation" as 'Level 2' NOR even have "Hoarding" as 'Level 3'.
I noticed a similar bug when there is a Lookup Field on the page. The whole row gets deleted except for the Lookup Input field.
Does anybody have a similar problem? A Senior Architect may be able to help and explain what caused the problem. Please feel free to request for the code if you can't replicate the issue on your own project.
As discussed over the case, TIER 3 mentioned that the immediate WAD statement is still the same, as you also confirmed the behavior.
"When immediate=true, the post data are not saved in the model on server side." which is the cause of the issue that they are seeing.
"It has been found that the issue was caused by the "immediate" attribute. It has been reported and hopefully this will get fixed.
It would need this attribute to allow Users to remove rows from the page without committing to the server."
At this point we know the issue is caused by the immediate=true parameter per you and we know that the reason for the picklists not saving between removal is because of the lack of server side commit which you doesn't want so this is WAD and won't work in that way. For now, you can consider the workarounds discussed previously.
Hopefully, this gets fixed!
All Answers
I'd be able to help more if you posted the code.
Field defaults are "-None-". What you actually see on the screenshots are values set and saved. The following are excerpts of the code:
I've escalated this issue to SF Support and they are looking at it right now but any expert feedback would be appreciated! =)
As discussed over the case, TIER 3 mentioned that the immediate WAD statement is still the same, as you also confirmed the behavior.
"When immediate=true, the post data are not saved in the model on server side." which is the cause of the issue that they are seeing.
"It has been found that the issue was caused by the "immediate" attribute. It has been reported and hopefully this will get fixed.
It would need this attribute to allow Users to remove rows from the page without committing to the server."
At this point we know the issue is caused by the immediate=true parameter per you and we know that the reason for the picklists not saving between removal is because of the lack of server side commit which you doesn't want so this is WAD and won't work in that way. For now, you can consider the workarounds discussed previously.
Hopefully, this gets fixed!