Make the Bank Transfer dialog remember the From and To accounts

If you are doing a lot of bank transfers, you might want to have one or both of the bank account popups remember their settings, at least for the session.

Here's a script that does that.

constant meta = "Cognito Sample Code"

property from = ""
property to = ""

on Before:F_BANK_XFER(w)
	SetFieldValue(w, "M_FROM", from  + "@")
	SetFieldValue(w, "M_TO", to + "@")
end

on After:F_BANK_XFER(w)
	let from = Slice(GetFieldValue(w, "M_FROM"), 1, ":")
	let to = Slice(GetFieldValue(w, "M_TO"), 1, ":")
end
Posted in MWScript, Tip du Jour | Comments Off on Make the Bank Transfer dialog remember the From and To accounts