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
Matthew BracewellMatthew Bracewell 

An automatic lookup happening on cases

Hi all -

I am working on cases within salesforce and basically the "Account Name" automatically looks up when a "Contact" is added. This is based on the contacts relationship to the account. I want to work this slightly differently so the account looks at a custom object i have built and use a trigger to do this. However i cannot find how the current lookup is working. There is no trigger live and there is also no workflow set for this. It is as if there is a hidden lookup happening as it happens instantly as soon as you add the contact - whereas the trigger and workflow would only happen when you save the record. Any help would be greatly appreciated,

Thanks Matt
ShivaKrishna(Freelancer)ShivaKrishna(Freelancer)
Hi Matt,

There is no Salesforce standard build in functionality to set the Account look up on selection of contact (But we have that on Task) so there must be some where that process is automated. so you need to check below things
I believe yours is not VF page which resembles standard page. if it is check the controller for that page
  • Tirggers on that account
  • work flow ( check the action 1) field update 2) flow)
  • flow can also be called from process builder.
so verify accordingly .. you may find the cause.

let me know, if it helps or need any help :)
shiva.sfdc.backup@gmail.com
Matthew BracewellMatthew Bracewell
Hi Shiva,

Thanks for this. 

You are correct it is a standard page not a VF page. 

There is no trigger, work flow or field update associated.

The 'Account Name' field and 'Contact' field are both Lookup fields however i cannot see any way that it automatically puts in the account when you populate the contact.

Any other ideas?

Thanks

Matt

 
ShivaKrishna(Freelancer)ShivaKrishna(Freelancer)
Hi Matt,

I don't think so we have any other ways than i mentioned above.

not sure from where you are redirecting to that page but if you are clicking on new button(custom button) from related list there we can auto populate look up in the redirected page.

what i mean if you are in account detail page and clicking on new button(custom button) from cases related list then we can auto populate the account lookup in case page by overriding the URL from custom button.

something like this

https://na2.salesforce.com/500/e?id of field to set={!Account.Entitlement__c} 
&id of Account lookup on Case_lkid={!Account.Id} 
&retURL=/{!Account.Id}

check this one as well. 

let me know, if it helps you or need help :)
shiva.sfdc.backup@gmail.com