function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karla Pliego 3Karla Pliego 3 

What to use a lookup or junction object?

Hello, 

I have a couple of objects named Listing and Transaction. I have another object called Market. Each listing and transaction record belongs to the same Market. So for example, when we carete a listing we add the Market by using a lookup field in the listing object. When this listing becomes a transaction (listings and transactions are related), then the transaction needs to have the field for the Market that corresponds to the same as the listing. I can do a process builder or a simple formula. However, the fields limitation in SF won't allow me to use a lookup field or a formula field as we are maxed out. Any workarounds suggested for this? 

Thanks ,

Karla
Aparna Hegde 1Aparna Hegde 1
Hi Karla,

How and when does the listing record becomes a transaction record? 

Cheers,
Aparna
Karla Pliego 3Karla Pliego 3
It does not become one, they are separate objects but related to each other. There is a button that you click on Listings that generates the transaction, you manually do it and it pulls some info from the listing into the closing via formula fields and process builder. We have one more field that needs to be pulled into here. Which is another custom object that I created for the Market. Does this answer your question? 
Aparna Hegde 1Aparna Hegde 1
Yeah it does. SO behind the button click is there a code thats generating the transaction? In the process builder or in the code behind the button are you not able to add this additional field? Do you get any error when you try to?
Karla Pliego 3Karla Pliego 3
It's part of the SF package that is installed. We purchase our licenses from a vendor that has already programmed custom objects. So I don't have access to the code, and even if I could I don't know how to do that as I dont do code :(  -- are there any other options? 
Aparna Hegde 1Aparna Hegde 1
Yeah, you could create a new process builder with the following options -
1. The process starts when a record changes
2. Add object = Transaction
3. Start the process only when record is created
4. No criteria just execute actions
5. Action Type = Update records
6. Select the Account record that started your process
7. Field = corresponding market field, reference select the market field in the listing object. save and activate.

You should be all set. Good Luck!

Cheers,
Aparna
Karla Pliego 3Karla Pliego 3
Hello, 

Yes, I have done these before. However, from what I understand for process builder to work the two fields, the one on listings and the one on transactions need to be the same field type correct? 

If so, the field in listings is a lookup field, therefore it won't let me create a new one in transactions since we are maxed out.

Please correct me if I'm wrong. Could I have a text field in transactions while the listings remains as a lookup? 
Aparna Hegde 1Aparna Hegde 1
Hi Karla,

Not really. You can update a text field or a lookup field with a value from text or lookup. 
If Market field is lookup on Listings and text on transactions, you can still update it. Give it a shot :)

For your question - Could I have a text field in transactions while the listings remains as a lookup? : Yes

Cheers,
Aparna