Could not find a way to display HYPERLINK formula field on my custom visualforce edit screen when create a NEW record:

in standard controller extension I use recalculateFormula


on visualforce page I use output field

<apex:outputField value="{!currentRecord.IBANLink__c}"/>

formula field itself:

HYPERLINK('https://www.iban.com/', 'IBAN Check')

Again: editing of already existing records works good. I encounter the problem only when try to create new record

UPD: Please see screenshot of corrupted hyperlink-formula on VF page:

enter image description here

  • This is because, when you are creating a new record the record is not created yet and there is no value assigned to the formula field. What is your actual requirement? – Saroj Bera Jan 25 '17 at 10:39
  • 1
    Why would you use a formula field for a value that will be exactly the same on all the records? Why not use the Custom Setting instead? This way you would work around the problem that was explained in the previous comment, meaning you could reference the value from the Custom Setting even before the new record is created. – dino ursic Jan 25 '17 at 13:00
  • @SarojBera is to see field formula result before record is creted – Yury Bondarau Jan 26 '17 at 11:39
  • @dinoursic this formula supposed to be dynamic - generate link based on data provided – Yury Bondarau Jan 26 '17 at 11:41
  • I forgot to attach a screenshot of how hyperlink-formula-field looks like after doing .recalculateFormulas(); in apex – Yury Bondarau Jan 26 '17 at 15:28

Your Answer

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

Browse other questions tagged or ask your own question.