This is a public Forum  publicRSS

Topic

    JJ
    Adding custom object values onto hyperlink shows nullAnswered
    Topic posted February 9, 2018 by JJGrand Master 
    54 Views, 2 Comments
    Title:
    Adding custom object values onto hyperlink shows null
    Content:

    Hi,

    I have a hyperlink control where the URL is:

    https://mywebsite.com/pdf/t/1/i/$wellbeing.referral.id/$contact.email.addr

    The contact email address is fine (put there for testing) but the wellbeing.referral.id is showing null in the browser. Wellbeing is a custom package. Referral is a custom object.

    Is this possible? Am I doing anything wrong? I am outputting the ID above the hyperlink on the workspace and it's showing the correct value.

    Best Answer

    JJ

    $wellbeing$referral.id

    This seems work!

    Answer

     

    • JJ

      $wellbeing$referral.id

      This seems work!

    • Sebastiaan

      Hi JJ.

      Not having worked with custom objects myself it might be that you need to work with $wellbeing (if wellbeing is the package name in which you CO resides)
      See Including a variable on a custom tab or custom link

      Passing Custom Object Field Values

      The following variable can be used to pass the value of a custom object field based on the package name, object name, and field name.

      $package_name$object_name.field_name

      To find the package name, object name, and field name to use in a custom object field variable, open the Data Dictionary (Configuration>Database>Data Dictionary). Custom object tables are listed in the format package_name$object_name.  For example, if a custom object named WorkOrder resides in the CO package, it will be listed in the Data Dictionary as CO$WorkOrder.  You can click the table to see a list of columns (fields) that can be passed in variables. For a column containing menu items, click the column to see the list of items along with the values that represent them.

      Example:  The following URL passes information about a field named PaymentType in an object named WorkOrder in the CO package to a field named payment_type.

      http://www.mydomain.com/myform.php?payment_type=$CO$WorkOrder.PaymentType

      System/Custom Attribute on the Incident object:  System attributes can be passed using this syntax: $object_name.package_name$field_name, e.g. $incident.CO$FieldText