I have created a Design Studio form for our AP20.1 screen where I have moved 3 user fields to the main tab. I have also made these fields be required based on the account number. I know want to find a way to clear of just the user fields, as we do not want to clear the co/au/account because they are always the same. It looks like everytime after you do an add or change on this screen the cursor postions itself on the company field. I am thinking I need to do an OnBlur function, so as soon as they move off this field to enter more lines the old user field informataion is cleared. Has anyone done something similiar? Do you think the OnBlur is the way to proceed or have any other suggestions?
Thanks
Tracy
David
Would that be the OnAfterTransaction function? I have not had much time to work with that one, but when I have tried it in the past it ignored my add or change and did the fucntions no matter what FC I used.
I had problems with FC too - this worked for me. function FORM_OnBeforeTransaction(fc) { return ( fc == "A" ? initF() : true ); } function initF() {
//whatever you need to do here
}
OR try this...
function FORM_OnAfterTransaction (data) {
if (data.selectSingleNode("//_f1").text == "A")
{
I will try those.
I have tried the OnAFterTransaction as below but both of them are triggering BEFORE the invoice is actually added. The box pops up, then when I click on the okay, it then adds the invoice. Any other suggestions?
/*function FORM_OnAfterTransaction (data) {
{ // for (var i = 0; i <= 99; i++) ; window.alert ("This is where it is") // lawForm.setFormValue("text77","",i); }
*/
Also tried: function FORM_OnAfterTransaction(val) {
if(val.selectSingleNode("//_f1").text=="A" && lawForm.getMessage()=="Add Complete - Continue") { window.alert ("This is where it is") } return true;
Tracy, I had very similar issue on HR11. I wanted to call PA12(Emergency Contact Info) after the employee is added. This worked for me. I assume you have checked the exact message being returned? The compare is of course case sensitive.
function FORM_OnAfterTransaction (data) { if (formState.agsError) return; //Check error message for :Add complete" - exit if not sMsg=lawForm.getMessage(); sMsg = sMsg.substr(0,5);
if (sMsg != "Add c") return;
if (data.selectSingleNode("//_f1").text == "A") { callpa12();
} } Hope that helps!