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
Marcelo TudiscoMarcelo Tudisco 

auto populate parent object based on other parent

Hi, i have a custom object Propuesta__c that has 2 custom fields: 
Account__c           Lookup(Account)
Opportunity__c     Master-Detail(Opportunity)

When we are working in an opportunitry and in related records we create the Propuesta__c the popup window already has the Opportunity filled, however the account is not and we have to fill it up, we could even select a different account than the one in the Opportunity. We want the Account__c to be read only and only show the same account that the opportunity, and we still need the account__c to be a lookup because we want from the account page to have the Propuesta__c in the related lists.

Is there any way to implement this? Dont know if an appex trigger would help? I'm not into appex so apreciate if anyone can give an example or suggest something else.

regards