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.
2023 Release Wave 1Check out the latest updates and new features of Dynamics 365 released from April 2023 through September 2023
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