Tuesday, February 23, 2021

How to get a list of tables (data sources) in an Entity through code - X++

 public void tableList(TableName _tableName)

    {

        DictDataEntity dictEntity       =     new  DictDataEntity(tableName2Id(_tableName));

        int                                                    dataSourceCount;

        Query                                                query;

        QueryBuildDataSource                    dataSourceName;

        str                                                      entityTableName;

        if (dictEntity)

        {

            query       = dictEntity.query();

            if (query.dataSourceCount() >= 1)

            {

                dataSourceCount = query.dataSourceCount();

            }


            for(int datasource=1;datasource<=dataSourceCount;datasource++)

            {

                dataSourceName    = query.dataSourceNo(datasource);

                entityTableName    = tableId2Name(dataSourceName.table());  

                info(entityTableName );              

            }

        }

    }


#D365F&O #DataEntities #X++ 

4 comments:

  1. My name is Olisa Blessing, I am so happy. I never believe I will be this happy again in life. I have worked as an air hostess ( cabin crew ) for 3years but early this year, I lost my job because of this deadly disease called Herpes virus (HSV). I never felt sick or notice any symptoms. Not until the day all workers were asked to bring their doctors report card, that was how I got tested and I found out that I'm HSV positive and that made me lose my job because it was considered as an STD and is an incurable disease. I was so depressed that I started thinking of suicide.
    I explained my situation to an older friend of mine, who often said to me 'a problem shared is a problem half solved. She felt so pity for me that she referred me to Dr. Utu Herbal Cure, that was how I contacted Dr. Utu and got the medication from him and was cured for real.
    I went back to my work a month later with another HSV negative test result and they carried out another test to be very sure and they found out I am herpes negative.
    Finally, the initial result was replaced with the new HSV negative test results and my position was rebuilt with an apology letter and a salary increase.
    Beware of impersonators,
    Dr. Utu can only be reached at:
    drutuherbalcure@gmail.com.

    ReplyDelete
  2. I’d recommend using Dr. Utu Herbal Cure topically for instant pain and itch relief as well as accelerated healing of lesions and permanently stopping oral and genital herpes virus outbreaks. I have tried just about everything from acyclovir suppressive therapy to different natural oils, extracts, and other natural methods, some of which are EXTREMELY painful and exacerbate the problem (i.e. apple cider vinegar!). While vitamin E oil and suppressive therapy worked well for me, when I became pregnant I went back to trying to find a herbal cure. I was using vitamin E oil topically for a while but it was thin and difficult to use and only seemed to prevent further outbreaks rather than getting rid of it. I contacted Dr. Utu Herbal Cure through my friend. To my surprise, I could tell my outbreak was starting to heal within only a few hours! No more itching or pain! Dr. Utu Herbal Cure that I used was liquid herbs in bottles, so it was very easy to use. It simply whiffs, but it works so I don’t care! The best part is I successfully delivered a herpes-free beautiful daughter without further medication. Anyone who’s tried Dr. Utu Herbal Cure knows just how quickly those treatments can add up. So give it a try! Anyone can reach Dr. Utu via drutuherbalcure@gmail.com
    +2349072733661

    ReplyDelete
  3. Good day everyone, today i free from this virus called herpes with the help of Dr Oyama HERBS. who save me from the virus with his herbal medicine so my dear friends if there is anyone who is suffering from this virus and any other diseases hepatitis like HIV, TB, cancer, fibroid, tubor blockage Infatuation high blood pressure Herpes and many other diseases, you can reach him or through contact email droyamasolutiontemple@gmail.com >WhatsApp +2348108264684




    Good day everyone, today i free from this virus called herpes with the help of Dr Oyama HERBS. who save me from the virus with his herbal medicine so my dear friends if there is anyone who is suffering from this virus and any other diseases hepatitis like HIV, TB, cancer, fibroid, tubor blockage Infatuation high blood pressure Herpes and many other diseases, you can reach him or through contact email droyamasolutiontemple@gmail.com >WhatsApp +2348108264684

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete