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
DJP1SDJP1S 

Pre-populate fields based on URL with a lookup field

I'm trying to get a detail page button that can handle prepulating fields upon entering a new account time entry from certain custom objects.

 

For instance my url from my Page1Project object looks like this: .

/a20/e?&CF00N40000002ajJy={!Page1Project__c.ClientCode__c}&CF00N40000002ajK3={!User.Name}&CF00N40000002cgfq={!Page1Project__c.ClientCode__r.Account__c}

 


I'm getting an error on that bolded part, is it possible to populate based on a lookup value in this case?

 

 

Noam.dganiNoam.dgani

what is the error?

there shouldnt be a problem doing that.

but,

you can always create a formula field in page1Project that rolls down that value from the account, and use that in your button.

Noam.dganiNoam.dgani

BTW - 

if i remember correctly, the hardcoded ids that you have there, change from each env (not sure though - worth a check).

 

DJP1SDJP1S

It's telling me the field doesn't exist (when it does). I'm not entirely sure that I can do lookup values - but the formula field is probably the best bet without getting too complicated.

Noam.dganiNoam.dgani

use the formula editor insert merge fields finction to get the correct name/path to your field.

 

glad the formula solution is working out for you.