I've made a "copy record" button on my dialog. It works fine with the {dialog.object}.populate method. Unfortunately this doesn't set my fields to dirty, particularly in repeating sections so none of that data gets submitted when hitting the button. I have to physically dirty all of the rows so that it will save the data. I've tried to use the .setValue method but I don't think it accepts the array of data that I need to pump in to my copied dialog. I've tried messing with e.dirtyColumns but it doesn't seem to work the way I expected. I should say, I'm not sure how to use it. Can I feed it a 'P' type variable and add it to the end of the below javaScript command?
Here's an example of the javaScript command that my xBasic function pukes out:
If I try the setValue method instead of the populate method it gives me a "object or method does not support ToUpperCase" and I have no clue where that is comming from. Like I said, my data format is probably ok going into the populate method but the setValue method wants something else.
Any help would be appreciated.
Thanks
Here's an example of the javaScript command that my xBasic function pukes out:
Code:
{Dialog.Object}.newRecord();setTimeout(function(){{dialog.object}._setRepeatingSectionRowCount('CONTAINER_2',7,true,true);{dialog.object}._setRepeatingSectionRowCount('CONTAINER_1',4,true,true);{dialog.object}.populate({ MACHNO: 686, PARTNO: '2630-AB-155', DWGNO: '2630-AB-155', STATUS: 'NEW', MACHTYPE: 'HTC', NUMPARTS: 1, OPNO: '1', LAYOUTREV: 0, MAINPRGNO: 259, NOTES: 'TEST', LAYOUTORD_A5INSTANCE1: 3, POSITION_A5INSTANCE1: 'JAW', DETAILSEQUENCE_A5INSTANCE1: 1, TOOL_A5INSTANCE1: 'WS', TOOLINFO_A5INSTANCE1: '', DETAILNOTES_A5INSTANCE1: 'Bonnet Bore', LAYOUTORD_A5INSTANCE2: 4, POSITION_A5INSTANCE2: '1', DETAILSEQUENCE_A5INSTANCE2: 1, TOOL_A5INSTANCE2: 'TH-372C', TOOLINFO_A5INSTANCE2: '', DETAILNOTES_A5INSTANCE2: 'TGTR 25.4-2', LAYOUTORD_A5INSTANCE3: 5, POSITION_A5INSTANCE3: '1', DETAILSEQUENCE_A5INSTANCE3: 2 },1,true);},1000);
Any help would be appreciated.
Thanks
Comment