Assistance needed with iNotes customization

I am in the process of updating the forms9_x.nsf database to mimic some functionality that we’ve customized for the Notes client. I’ve added an action button to the e-actions-mailedit menuid (new memo) that will append a value to the subject and then send the new memo. I’ve got the update to the subject working fine, but don’t know what to do to get the memo sent. I’ve tried xxForm.submit() but I get an error message. Here’s what my code in Custom_JS_Lite looks like:

function SendEncrypted(sId)

{

var answer = confirm("This memo will be sent in encrypted format to everyone listed in the To, CC and BCC fields. " +

“Are you sure this is what you want to do?”);

var x;

if(answer == true){

alert(“Yes, please encrypt”);

// Get the current backend document ID

var oPanelManager = AAA.Fkb();

var sContentID = oPanelManager.EdI.get(‘T’).oPrev.sId;

// Get the current UI document

var oMainDoc = AAA.EcK;

var subj = oMainDoc.getElementById(‘e-’ + sContentID + ‘-subject’).value;

oMainDoc.getElementById(‘e-’ + sContentID + ‘-subject’).value = "[encrypted] " + subj;

var newsubj = oMainDoc.getElementById(‘e-’ + sContentID + ‘-subject’).value;

alert("The new subject is " + newsubj);

var oForm = oMainDoc.getElementById(‘e-pageui-’ + sContentID);

//oForm[‘tmpSendOptions’].value = “1”

oForm.Submit();

alert(“Document submitted”); }

else{

alert(“The answer is cancel”);}

return;}

Any help would be greatly appreciated.

Sandra

Subject: Found the answer in 8.5 Forum

I found the solution in the 8.5 forum. Rather than oForm.submit()… used:

AAA.DSq.ELU(event, ‘e-actions-mailedit’, ‘EbK’, {sAction: ‘a-send’});

Subject: Can you provide more detail?

Hi, Sandra, I have a similar requirement, but my environment is 9.01. I can not see the subform Custom_JS_Lite in iNotes\forms9.nsf. Did I miss anything. Also, the code in the existign subforms are almost unreadable, is there any tool to format the code so it become more readable?

I am a notes developers but never did anything for iNotes. Any help is appreciated.

Thanks