The CreatorCon Call for Content is officially open! Get started here.

System Definition -> Relationship query script

Joe Weisiger
Giga Expert

Hello,

I need help scripting a relationship query.  I am working with Contract Management and want to add "Projects" to the contract form related list.  From here, users can select projects that are related to the contract.

I created a relationship (called Projects) between ast_contract table and pm_project table but I need help with the query with script.  

I added the Projects to the contract form related list and it current is showing all projects in the system.  I want it to start blank on a new contract so that the users can add related projects.  When I click on the edit button nothing currently happens.

Any help is appreciated!

Thank you,

Joe

4 REPLIES 4

Jorn van Beek
Tera Guru

before I will try to help you I advise to look at @Robert Fedoruk youtube, he explains it much better then I ever can.

https://www.youtube.com/watch?v=yJttdDa-9xU

Thanks so much for the shout out!

Aman Kumar S
Kilo Patron

Did you build and m2m relationship among the two tables?

 

Best Regards
Aman Kumar

Uncle Rob
Kilo Patron

This seems like a use case for a many-to-many table, not a custom relationship.
There are 2 ways to create M2M tables depending on the experience you're looking for.