i made a little crm app that has the Entities : Contact, Campus, Sub Campus,
the contact has lookup fields for campus and sub campus.
(each sub campus is related to only one campus)
im supposed to make a plugin in C# that on contact creation it fills the campus field based on sub campus.
how do i get the campus through sub campus field...?

What does this C# plug into? That's unclear. Sometimes I find a person call a method or function a "plugin" so let's clear that up now.
That asked, I see some nice examples that could lead to your solution but can't tell what you want as to the plugin at:
https://www.google.com/search?&q=get+all+lookups+from+a+lookup+field+in+Dynamics+365+CRM+in+C%23

commented: i mean i've reached to the point of creating a new contact and filling some fields in it; just i dont know how to fill in lookup fields +2

My question is still: What does this C# code plug into? Again, some call a method or function a plugin so let's clear this up.

commented: im using plugin registration tool and going to set the Step On CREATE. registering it to my Dynamics 365 App; hopefully i made it clear with this +0

Looks like I'll have to bow out here as I don't know this setup. Maybe it's Visual Studio, C# and such but there's not enough here for me to follow what you are doing.

Sadly I see Microsoft's own Dynamics 365 have been in maintenance since you posted this question.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.