PDA

View Full Version : LoadRecord not working !!Weird!!



tBSTAR
29 Dec 2010, 11:44 AM
this line is panel.getForm().loadRecord(payer) working on my dev environment but when I post the update to the server, the form doesn't get populated. I have identical files as I do in my computer. Same Ext version, same code same everything and no errors. It executes just fine but it is not showing on the server and it's showing on mine.

Any Ideas?

tBSTAR
29 Dec 2010, 12:09 PM
BEFORE: Not working
panel.getForm().loadRecord(payer);
panel.addButton({text: 'OK',...
panel.addButton({text: 'Cancel',...
window.show();

AFTER: Working
panel.addButton({text: 'OK',...
panel.addButton({text: 'Cancel',...
window.show();
panel.getForm().loadRecord(payer);

I have no idea why it's doing that but I am glad it works.

Condor
29 Dec 2010, 12:23 PM
A form must be rendered before you can set the values/load a record.

tBSTAR
29 Dec 2010, 1:31 PM
Thanks Condor but I couldn't explain why it was working ok on my computer and not on the server with the same exact code.