Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
Hope all doing good and safe. I'm facing some issue and i'm new to CRM . Can you please help me how to solve this issue.
We have an entity name "X". Now, when I'm creating a new record we have one field name "Internal Viewer Team" Its a lookup for all teams.
1. If I keep blank on internal viewer team field and saved the record. In share button i must not see any team. - Passed. Its working fine.
2. Now, Scenario 2 : Selecting one team in internal viewer team as test “team 191”. Now i am able to see that team in share with Read, Write , Append access - its working fine for me. Passed.
3. Now Scenario 3 : Now, I'm Selecting other team in Internal viewer team as "XYZ". Now in share, I am able to see before one(i.e test team191) and this one as well. But my requirement is this "test team 191" must be removed automatically once i select other team.
Can any one help me out with plugin code on scenario 3 to actives the task. Will mark for qualified answer.
It looks like your plugin code currently only doing the sharing, its not unsharing from the old team.
You will have to update your code to unshare from previous team. For an update plugin, you can register both pre & post images. You can get the previous team from the pre-image and do the unshare first and then share it with the new team. You can get the new team from the PostImage.
If you would like to see the sample code for sharing and unsharing, please follow the link below
saikrishnayadav.blogspot.com/.../Sharing and Unsharing the record using Plugin
Please refer to the following link to see an example for pre & post image usage
Hope this helps
Apricated your response. I have one more scenario can u please help me out with the approach and plugin code .
I have primary internal contact lookup and internal viewer team lookup on that form.
If sharing fails -
when there is a failure in synchronizing the Internal viewer team to record sharing an Internal comment activity must be created and email has to sent who the person is in primary internal contact.
can u please help me out here. i will mark as verify
You should add try & catch in your share code. now in Catch you can use below code to create activity and send email from plugin.
Make sure you register your plugin steps in Asynchronous mode because system does not allow you to catch exception in Synchronous plugin.
when sharing fails, we will get an error in CRM Right? were we need to store that error?
You are sharing record through plugin code right?
So you should add try and catch in your plugin code where you added the code to share your record.
// Grant the team read/write access to the lead.
var teamReference = new EntityReference(Team.EntityLogicalName, _teamId);
var grantAccessRequest = new GrantAccessRequest
PrincipalAccess = new PrincipalAccess
AccessMask = AccessRights.ReadAccess | AccessRights.WriteAccess,
Principal = teamReference
Target = leadReference
//Here Add create Email Activity and Send Email code
Please mark my answer verified if i were helpful
There are few different ways to approach this, the following sample code could be executed in the catch block when the sharing fails.
The above code is just an example, feel free to change as per your needs
How can i retrieve all records in that lookup? because we dont know which contact they select
Is this a lookup field on that entity, "primary internal contact."? If so you do not need to retrieve all the records, you can just use the value from this lookup as that's the contact you want to send the email to.
Hi Kokulam, can you please suggest the below scenario
I Have an "X" Entity in that i have a team lookup name as "Internal Team viewer". Now, when i create a new record, the form consists of tabs called general, items, client.
The 'X' entity has 1:n relationships for items, and client.
Now, if i create a record, it will share to the team people who is in "Internal Team viewer". and now my task is that record must cascade to items, client as well.
can you please tell me how to achieve? and approach?
Business Applications communities