Notifications
Announcements
No record found.
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
Hi,
Team template schema name
team template guid
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>
Hi Aman,
You can also try with query expression- Below is the code . Hope this helps.
ConditionExpression condition = new ConditionExpression(); condition.AttributeName = "teamtemplatename"; condition.Operator = ConditionOperator.Equal; condition.Values.Add("Template Name need here"); FilterExpression filter = new FilterExpression(); filter.Conditions.Add(condition); QueryExpression query = new QueryExpression("teamtemplate"); query.Criteria.AddFilter(filter); query.ColumnSet = new ColumnSet("teamtemplateid"); // You can add additional column as well here EntityCollection accessTeamColl = service.RetrieveMultiple(query); // Need to get the Org service proxy foreach (var templateent in accessTeamColl.Entities) { string Id = ((templateent.Contains("teamtemplateid")) ? (templateent["teamtemplateid"] as EntityReference).Id.ToString() : ""); }
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".
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2