Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
Hello,I need help writing a plugin that updates a boolean field of the target entity, if a value of the target entity exists in the records of another entity.Specifically, the target entity is 'Case' and the attribute I am interested in is Serial Number (which is a lookup field). So, I need to check if Serial Number already exists in another entity ('Warranties'), and if so, if it has not expired (ending date > today). Plugin will get triggered when a Case is created and if all criteria are met, it will update a boolean field to 'true'.Should I get service.retrieve to get all warranties records and check if value exists or should I use a foreach on the Warranties Entity? I don't have any experience on writing plugins, so any help would be much appreciated.
service.retrieve will not work in this.
You will need to use either fetchxml or queryexpression to check if serial number is exist in warrnty entity.
Fetch XML Example
Query Expression example
I would recommend you start with understanding how basic plugin works and how you write it by this sample : crmbook.powerobjects.com/.../
post that learn to use retrieve multiple with query expression : crmbook.powerobjects.com/.../
Business Applications communities