I have been working on a method to transfer groups of people from one agent to another. This was working very well in the working preview and the live preview. However, when I published it and ran it through firefox, it failed. The idea is to show a list of people assigned to one agent, click on the ones that are to be transferred, click on a button to select the new agent from a dialog, then populate the selected agent back into the checked items in the grid.
These are sample screen shots of the routine working and not working (the not working one was from Live Preview with Firefox, also tested on Chrome, Safari and IE, the only one that worked was IE)
prospecttrf1.PNGprospecttrf2.PNGprospecttrf3.PNG
When the select agent button is clicked, the following javascript is run:
var parentGrid = window['__callingGridAlias'];
if(typeof parentGrid != 'undefined' ) {
var val = {dialog.object}.getValue('agentID');
window[parentGrid + '_GridObj'].setValue('G','agentID','1',val);
window[parentGrid + '_GridObj'].globalUpdate(1,{
fieldToUpdate: 'agentID',
sourceValue: 'ReadFromCurrentRow',
sourceElementId: 'newAgentID',
rowsToUpdate: 'CheckedRows',
onlyUpdateBlankFields: false,
promptForConfirmation: false,
confirmationMessage: 'OK to change value in row [row] from \'[old]\' to \'[new]\'?',
type: 'update'
});
var cw = A5.windows.getFromElement(this);
cw.hide();
}
The __callingGridAlias is defined in the grid button that is used to open the dialog component.
The code is as follows:
{grid.Object}.saveSearchCriteria('current');
{grid.Object}.filterCheckedRows();
window['__callingGridAlias']={Grid.object}.gridId;
Any help or insite would be greatly appreciated.
Thanks,
Sam
These are sample screen shots of the routine working and not working (the not working one was from Live Preview with Firefox, also tested on Chrome, Safari and IE, the only one that worked was IE)
prospecttrf1.PNGprospecttrf2.PNGprospecttrf3.PNG
When the select agent button is clicked, the following javascript is run:
var parentGrid = window['__callingGridAlias'];
if(typeof parentGrid != 'undefined' ) {
var val = {dialog.object}.getValue('agentID');
window[parentGrid + '_GridObj'].setValue('G','agentID','1',val);
window[parentGrid + '_GridObj'].globalUpdate(1,{
fieldToUpdate: 'agentID',
sourceValue: 'ReadFromCurrentRow',
sourceElementId: 'newAgentID',
rowsToUpdate: 'CheckedRows',
onlyUpdateBlankFields: false,
promptForConfirmation: false,
confirmationMessage: 'OK to change value in row [row] from \'[old]\' to \'[new]\'?',
type: 'update'
});
var cw = A5.windows.getFromElement(this);
cw.hide();
}
The __callingGridAlias is defined in the grid button that is used to open the dialog component.
The code is as follows:
{grid.Object}.saveSearchCriteria('current');
{grid.Object}.filterCheckedRows();
window['__callingGridAlias']={Grid.object}.gridId;
Any help or insite would be greatly appreciated.
Thanks,
Sam
Comment