Struggling with populating fields into related custom objects

  • 1
  • Question
  • Updated 4 years ago
Most of the examples here are based on standard salesforce objects, and we use mostly custom objects and so trying to take an example for populating the address on a new contact from an account and apply to our scenario is somewhat confusing for newbees to the product. We have a custom object called Service_Type__c and we have a related list for cases. UI looks great works great, etc. but when we create a new case from the Service, none of the fields populate. When we create a new case from the table, the related service ID does populate, critical to linking the case to the service. My question is simply, how do we pre-populate more than just the service ID when creating a record inline? We have a field on the Service called Client Number that we would like to fill when inline creation of documents?
Any assistance would be greatly appreciated!
Photo of Ben

Ben

  • 780 Points 500 badge 2x thumb

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Here are a couple easy options.
  1. Create Conditions on the Case Model to automatically take on values from other models or URL params.
  2. Instead of Using inline record creation on the table, switch to using a Global Action. You can use the action "Create new row" in order to select values using merge syntax.
Photo of Ben

Ben

  • 780 Points 500 badge 2x thumb
Pat,
Thanks but I am not getting the dialog you reference above. When I select a new global action, Create new row, the only options are Place Row.. and of course the icon and label. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Is this still not working?
Photo of Ben

Ben

  • 780 Points 500 badge 2x thumb
Well we are able to add from a table row, and populate the necessary fields. The problem that I have come to find out, is that when in edit mode the conditions act as defined values from the existing object, but when in read mode, they are conditions and act to control what you can see. By using the conditions, if someone blanks out a value used in the conditions and saves the record, well although the record does get created, they cant see it. For instance, we have a service that may or may not have a username and email address. When a client calls to create a case, sometimes it is the user that created the service and sometimes not. If we populate a field in the table with these values and they are blank when saved, the case disappears from the service, although you can still see it when using standard SF views. A little confusing but our app is quite complex and uses mostly custom objects. Guess we have to try and send using a url with the parameters to set the fields in the url.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Merge syntax is certainly the way to go for your use case and should work without issue. Something isn't setup properly if the merge syntax isn't providing default values.

Conditions can also be used, but you'd have to activate and deactivate them before and after creating the row.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
asdf
Photo of mB Pat Vachon

mB Pat Vachon, Champion

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