Having issues setting reference field to Opp URL parameter in link?

  • 1
  • Question
  • Updated 4 years ago




Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Is the Name field in your Project Model?  
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
yes

(Edited)
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Is Opportunity__r.Name in your model?  Or whatever the name of your custom lookup field on Project to Opportunity is.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Or Maybe BLND_Opportunity_Link__r.Name
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb
The project model is loaded on page model?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb


I was tinkering before with all the settings. This is what I think it should be.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Oh, I hadn't noticed that you had "Load Model Data on Page Load" set to false.  Since this is the case, no query is made to look up the opportunity's name.  You'll have to work around this issue by either sending the name as another parameter, or having another model that gets the opportunity's name.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
That was it. Added a model to hold the ID of the Opp (PassedInOppID), then set a condition on the Project model  BLND_Opportunity_Link__c to be the  Opportunity ID of the PassedInOppID model.

Thanks
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Correct!  If you are creating new records in your page -  you either need to bring in prepopulated data in multiple parameters (which gets messy)  or include another model that loads the data you want prepopulated.  Thanks for clarifying the situation Ben.