I have a 'Proposal' (through Apttus Manage package) and a custom object 'Credit'. Both the objects are child to Account. I need to create a link/button/hyperlink on proposal object which will redirect to corresponding active 'Credit' record.

Note-An account record will have only one active credit record.

  • 1
    Sounds good. What have you tried so far? How are you tracking the active credit record? – David Reed Nov 24 '18 at 19:42
  • I tried using detail page link - {!URLFOR( $Action.Credit__c.View, Credit__c.Id )} , it didn't work. 'Is Active' checkbox tracks the active credit record, which is done through trigger, whenever a new credit record is created for an account, all other credits associated with that account are marked as Inactive – Manish Anand Nov 24 '18 at 19:49

Since you've already got a trigger populating the Active flag on your Credit records, just extend the trigger to populate the Salesforce Id for the active record into a new lookup field, on the Account, to Credit. Call that field Active_Credit__c.

Then, your declarative functionality can reference the field on the Account. You can, for example, create a Custom Link with the value


You could likewise build a HYPERLINK() formula field using the same type of reference.

  • I missed to add another note- We have almost reached the maximum limit of the number of fields on account. So we are not allowed to create any field on account , until its super necessary. However, I can create a lookup field on proposal which will hold the ID of Credit record . Is lookup necessary here or I can create a text field and can use it in a custom link? – Manish Anand Nov 24 '18 at 20:07
  • It doesn't have to be a lookup field. You can put the field on Proposal if you want but you'll need another trigger to ensure it is always populated. – David Reed Nov 24 '18 at 20:12
  • It worked. Populated a text field on Proposal to hold the ID of Credit record through trigger in an After Insert event of credit trigger and then used in the custom link. Not sure, what do you mean by "you'll need another trigger" .Am I missing something? – Manish Anand Nov 24 '18 at 20:53
  • How are you going to populate the field on new Proposals? – David Reed Nov 24 '18 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.