Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dynamics crm pulgin code

Posted on by 35

hello ,

let's say i have two main entities (vacancy and employee) and i would like to find the best employee that matches with this vacancy according to different criteria like (age-if he has a driving license -gender ) , and these fields are implemented in both entities (vacancy and employee) ..

i want to write a plugin code that searches for this employee after finding the match between what is required in the vacancy and what the employee has wrote in his application form !

as a new crm developer i need your help please :)

thank u in advance !

*This post is locked for comments

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: Dynamics crm pulgin code

    I think you can make a custom web form with search criteria on that and  and a grid-view to display the records.

    if it's on premise system it's more of use.

    if it's the online then you can use html web resource and using JavaScript write the query to get the result.  html web resource will contain the same thing as web form.

  • yehyaz Profile Picture
    yehyaz 35 on at
    RE: Dynamics crm pulgin code

    Thank u very much

    all i want now (after searching and finding) is to display these employees .. did u get it ?

  • Suggested answer
    shivaram Profile Picture
    shivaram 3,315 on at
    RE: Dynamics crm pulgin code

    Hi,

    Based on above condition, you will get all Employee list. After that either you can maintain a relation with this Vacant Entity. (This is Purely based on your requirement.)

    So provide me the requirement.

  • yehyaz Profile Picture
    yehyaz 35 on at
    RE: Dynamics crm pulgin code

    Thank u all ..

    what i need is what shivaram said.

    i want to retrieve these employees based on my condition .

    But shivaram : where can i display this list of employees ?

    or i have to open new records ?

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Dynamics crm pulgin code

    Hi,

    You can do an advanced find query to build the criteria to search for employees.

    www.youtube.com/watch

    Once you have the advanced find, you can download the fetch XML, update the hardcoded value with variables and then  do a retrieve multiple to get the desired results.

    msdn.microsoft.com/.../gg328117.aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics crm pulgin code

    you need to create N:N relation between employee and vacancy entities

    and then write plugin for vacancy entity and in this plugin code you get all employees who apply for this vacancy (employee records related with this vacancy record) and make calculation to get the best one for example you can create field to display percent for each related employee after make calculation

    BR

  • Verified answer
    shivaram Profile Picture
    shivaram 3,315 on at
    RE: Dynamics crm pulgin code

    Hi,

    As per my understanding, you will mention requirement in Vacancy Entity and then based on this you need to get Employee. If this is your requirement,then retrieve all Employee based on your conditions, like following (I am using early bound)

    using(var Xrm=new XrmserviceContext(organizationservice)){

    var suitableEmployee= Xrm.EmployeeSet.where(Employee.Age==Vacant.Age&&Employee.Gender==Vacant.Gender&&Employee.HasDrivingLicence=true).toList();

    }

    Based on above code, you will get suitable Employee list.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans