Hi,

My problem is that i want to know as to what is the field on which a EDT
have been created in the concerned table :-

In the code below i am trying to find that given a tablename and a
fieldname, i will get the corresponding EDT from which value is Coming(
which in turn will fetch the value from underlying table on which EDT is
created) in my case the table is CustTable and field is Currency.


static void TableNameFromRelation(Args _args)
{
    DictField dictField;
    DictType  dictType;
    DictRelation dictRelation;
    DictTable DT;
    TableRelation obj;

    ;
    dictField = new
DictField(tablenum(CustTable),fieldnum(custTable,Currency));
    dicttype = new dicttype(dictfield.typeId());

    print dicttype.name();

    dictRelation = dicttype.relationObject();

    if (dictRelation)
    {
        print "Relation lines: " + int2str(dictRelation.lines());
        obj = dictRelation.lineType(1);
        info(strfmt("%1",obj));
     }
    else
    {
        print "No relation defined";
    }

    DT = new DictTable(dictRelation.table());
    print DT.name();
    pause;
}

what i am not able to find from this code is that the data is fetched from
Currecy table ( which i am getting ) but also i want that the data is coming
from CurrecyCode field of Currency Table.



Please share your views and also tell me whether i am doing it correctly.



Regard

Ashish Singh


[Non-text portions of this message have been removed]



Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.




SPONSORED LINKS
Business finance course Business to business finance Small business finance
Business finance consultant Business finance magazine Business finance schools


YAHOO! GROUPS LINKS




Reply via email to