Hi Manfred,

dictTable   = new DictTable(record.TableId);
dictIndex   = new DictIndex(record.TableId, dictTable.primaryIndex
());

if (dictIndex)
{
    for (indexCount = 1; indexCount <= dictIndex.numberOfFields();
indexCount++)
    {
        info(record.(dictIndex.field(indexCount)));
    }
}  

Regards Markus

--- In [email protected], Hans-Walter Bous
<[EMAIL PROTECTED]> wrote:
> Hello Manfred,
> you should do something like this:

> DictTable  dt;
> DictIndex  dx;
> IndexId      ix;
> Int             i;
> ;
> dt = new DictTable(YourTableid);
> if (dt.primaryIndex())              //gives you the Primary index
> {
>    ix  = dt.indexNext(0);
>    while (ix)
>    {
>        dx = dt.indexObject(indexId);
>        if (dt.primaryIndex() == dx.id())
>        {
>             for (i=1; i <= dx.numberOfFields(); i++)
>             {
>                  //here you'll get the fields belonging to the
index
>             }
>        }
>        ix = dt.indexNext(ix);
> }
>
> smeagul2303 <[EMAIL PROTECTED]> schrieb:
> I want to write a method which tests if a record can be inserted in
> a table without violating any primary index declarations (no
doubles).
>
> But how do i find the primary index of a table ?
>
> Regards
>
> Manfred
>
>
>
>
>
>
> ---------------------------------
> Yahoo! Groups Links
>
>    To visit your group on the web, go to:
> http://groups.yahoo.com/group/development-axapta/
>  
>    To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>  
>    Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>            
> ---------------------------------
> Gesendet von Yahoo! Mail - Jetzt mit 1GB kostenlosem Speicher
>
> [Non-text portions of this message have been removed]






Yahoo! Groups Links

Reply via email to