пятница, 17 апреля 2015 г.

How to update parrent form current form

We have form1 - parent form and form2 - child form, which opens from form1.
If you want do autoRefresh form1, you should use this code:

This code must be populated on Close() method form2
if(element.args().caller() is FormRun && element.args().caller().name() == formStr(Form1))
    {
        formRun = element.args().caller();
        if(formRun)
        {
            formRun.task(#taskF5);
        }
    }

How to get value divided by symbol AX 2012

Hi everyone.
Today I must create method, which had to create a list from current string value , divided by slash (/).
And I have written this code:

#Characters_CN
    List            list = new List(Types::String);
    ListIterator    iterator;
    container       packCon;
    int             slashCount = 0;

    list = strSplit(this.CoverSheetURL, #slash); //this.CoverSheetURL - your string value       iterator = new ListIterator(list);
    while (iterator.more())
    {
        packCon += iterator.value();
        slashCount++;
        iterator.next();
    }
    return conPeek(packCon, slashCount);


I hope, it will be useful for you :)