• rbkrbk
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
This was asked before and answered with a URL hack that does not work in Lightning. 

I created a new Custom Object called “LOA Onboard”. I have overridden the New button for "LOA Onboard" with a Visualforce page that just sets a default value for the record Name so that it could be modified by a workflow rule. We have renamed the Account object to Client.

I created a Master-Detail field in LOA Onboard called Client and listed Account as the Parent. I created a new LOA Onboard record from the Related List in an Account instance. The Client field is not automatically populating with the Parent.If a revert the New button to default then auto-populate works.  I am attaching the relevant screen shots. How can I rewrite the VF page to fix this?

Client Field Definition:
Account Field Definition
Visualforce Page Override:
VF Page to replace the New Button

The Override settings:
User-added image
 
  • August 11, 2021
  • Like
  • 0

I am creating a custom button.

Because the formula in the custom button wizard would not do a compound lookup (where we need to retreive a field of another record field like {!Renewal_Summary__c.Client__r.Folder_Location__c} ),

I created a new field of type formula that returns a field of a related object (Account__r.MyField__c)

This works fine if I include the new field in a page layout, but resolves to null if the field is not displayed.

 

Is this expected? No one ever wants to see this value displayed.

I want to display current date  on a  field. i have writtened in formulae editor
 System.datetime.now
which results error and i have tried 
$System.OriginDateTime. but even getting wrong date.

I am creating a custom button.

Because the formula in the custom button wizard would not do a compound lookup (where we need to retreive a field of another record field like {!Renewal_Summary__c.Client__r.Folder_Location__c} ),

I created a new field of type formula that returns a field of a related object (Account__r.MyField__c)

This works fine if I include the new field in a page layout, but resolves to null if the field is not displayed.

 

Is this expected? No one ever wants to see this value displayed.

I hope someone can help me.  I have a VF page that includes 4 tabbed sections.  One of them is a custom search tab.  When the user types their criteria (an account name) into the inputtext box, and clicks my search button, everything works great.  If the user types in their criteria, then presses "Enter",  the page refreshes and takes the user back to the first tab (my search tab is the fourth tab).
How can I get pressing enter to be the same as clicking the button?

Thanks in advance!!

Jim
  • August 27, 2008
  • Like
  • 1