Hi,
I am new to CRM . I created a two entities called (new_university) and (new_student),
In new_student entity i have a fields called University ID which is plain text filed and University code Which is a lookup field and in new_university entity created a field called University ID (plain text).Now the problem is when i enter the student_university ID(plain text) in new_student entity it should compare with University_University ID (plain text) .if it equals, the value should be set to the lookup field in student entity(University code). i tried to do with workflow but it is not working
My workflow conditions:
If student_university ID equals to university_university ID ,then
Update student_university code
so, I am trying to do with Java Script ,but i am new to java script
Can anyone help me to achieve this
Thanks in Advance
John Adrew
CRM Developer
*This post is locked for comments
Hi John,
You can able to do it through custom workflow, plugin and JS. Kindly follow below steps to do it in any way:
1. Retrieve student entity and filter it through university Id.
2. If you have record count is equals to one.
3. Fill out your desire lookup field.
If you have any query do let me know.
Thanks
Regards,
AW
Take a look at the following.
It contains the steps, sample code and a sample solution you can download.
I saw multiple requests for the same this week, so decided to write something up...
community.dynamics.com/.../populate-lookup-field-based-on-related-entity-value
Hope this helps.
Hi Aric ,
Thanks for reply,
I tried using REST Builder . but the thing i am not able to compare the values from 2 different fields and i am very new to java script . i am not able to retrieve the value from university Entity with out any entity reference ,
Thanks
Take a look at the following:
community.dynamics.com/.../263071
I think this is a very similar question which might provide you an answer for what you are looking for. At this point it is not yet verified, but I think the answers you see there should give you the right approach on how to implement this.
Basically you need to use SDK.REST to retrieve the data from the related entity, and get the Guid of the entity you are looking for, and then populate the lookup field from the value you retrieved from the REST call.
Hope this helps.
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6