Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : kxvM/5sYFLzoiX4Ngehco0
Microsoft Dynamics CRM (Archived)

How to get GUID of Access Team Template?

Like (0) ShareShare
ReportReport
Posted on 10 Mar 2018 20:42:35 by 306

Hi Experts,

I want to fetch the GUID of access team template using Plugin.

Any Help will be Appreciated.

Thanks in Advance

Regards,

Aman Anvaria 

*This post is locked for comments

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on 12 Jul 2018 at 12:35:05
    RE: How to get GUID of Access Team Template?

    Hi Aman,

    You can retrieve the teamtemplate (logical name for access template entity) using Query expression in C# plugin.

    See: arunpotti.wordpress.com/.../retrieve-records-using-query-expression-c-sdk-in-crm

    Hope this helps.

  • Suggested answer
    Goloknath Profile Picture
    on 12 Jul 2018 at 11:47:36
    RE: How to get GUID of Access Team Template?

    You can open the window where you have created the team and open the "console" (using F12)

    You can in the "console" tab write the following: "window.location.href".

    When doing so you will get an url like: "<root>/main.aspx?etc=92&extraqs=%3fetc%3d92%26id%3d%257bB3228218-B8F6-4A1B-A18D-552C6F980831%257d&histKey=777420436&newWindow=true&pagetype=entityrecord#108249740"

    If you check the url, you can see the Guid in here. It starts after the following characters "257b". Therefore the Guid in my case would be: "B3228218-B8F6-4A1B-A18D-552C6F980831".

  • Suggested answer
    gdas Profile Picture
    50,089 Moderator on 11 Mar 2018 at 14:30:05
    RE: How to get GUID of Access Team Template?

    Hi Aman,

    You can also try with query expression- Below is the code . Hope this helps.

    1. ConditionExpression condition = new ConditionExpression();
    2. condition.AttributeName = "teamtemplatename";
    3. condition.Operator = ConditionOperator.Equal;
    4. condition.Values.Add("Template Name need here");
    5. FilterExpression filter = new FilterExpression();
    6. filter.Conditions.Add(condition);
    7. QueryExpression query = new QueryExpression("teamtemplate");
    8. query.Criteria.AddFilter(filter);
    9. query.ColumnSet = new ColumnSet("teamtemplateid"); // You can add additional column as well here
    10. EntityCollection accessTeamColl = service.RetrieveMultiple(query); // Need to get the Org service proxy
    11. foreach (var templateent in accessTeamColl.Entities)
    12. {
    13. string Id = ((templateent.Contains("teamtemplateid")) ? (templateent["teamtemplateid"] as EntityReference).Id.ToString() : "");
    14.  
    15. }


  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,626 on 11 Mar 2018 at 12:13:17
    RE: How to get GUID of Access Team Template?

    Hi,

    Team template schema name

    1374.13.png

    team template guid

    1374.13.png

    Use FetchXML to construct a query

    https://msdn.microsoft.com/en-us/library/gg328117.aspx

    Sample

    <fetch count="50" >
    <entity name="teamtemplate" >
    <attribute name="description" />
    <attribute name="teamtemplateid" />
    </entity>
    </fetch>

    5008.14.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,729 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,718 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading complete