This new form contained a JournalId field and I wanted the users to be able to right-click goto main table to open the LedgerJournalTable showing the journal record.
Because the journal may or may not be posted I needed to set the standard filter on the LedgerJournalTable form to show all journals (by default when the form is opened it shows 'Open' Journals only) So, I added some code to the init method of the LedgerJournalTable form to check the element.args().caller().name for my new form and then set the filter.
This worked a treat, except I managed to break the journal lookups in other areas of the system e.g. Vendor transactions -> Original document.
To cut a long story short the Original Documents function is a class (which does not have a name() method that also calls the LedgerJournalTable form.
To get around this issue I used the code below which checks to see if the caller is a form before calling the name() method.
if (element.args() && element.args().caller())
{
// Make sure this was via a form.
if(SysDictClass::is(element.args().caller(), classnum(FormRun)))
{
// Cast the caller and make sure it is the right form.
callerForm = element.args().caller();
if (callerForm.name() == formstr(LIQ_RegisterCashControlDetails))
{
allOpenPostedField.selection(AllOpenPosted::All);
}
}
}
nice blog.looking forward to see more of such informative postings.
ReplyDeleteMS Dynamics Online Training
Thanks for sharing this wonderful content.its very useful to us.I gained many unknown information, the way you have clearly explained is really fantastic.keep posting such useful information.
ReplyDeleteoracle training in chennai
oracle training institute in chennai
oracle training in bangalore
oracle training in hyderabad
oracle training
hadoop training in chennai
hadoop training in bangalore
I have a mission that I’m just now working on, and I have been at the look out for such information.
ReplyDeletedata science course in malaysia
uc satın al
ReplyDeletelisans satın al
yurtdışı kargo
özel ambulans
minecraft premium
en son çıkan perde modelleri
nft nasıl alınır
en son çıkan perde modelleri