This topic contains 3 replies, has 0 voices, and was last updated by MChammaTX 6 years, 5 months ago.

  • Author
    Posts
  • #17984

    k_dunc

    Hi there,

    I have a Suitelet form that displays a Sublist. In the Sublist, I show a URL in one column that I get from running a search for a given ‘Hyperlink’ field in an Entity record. I’m hoping to have this URL launch in the current tab when clicked. I’m currently using a ‘FieldType.URL’, but suspect that I should instead use ‘FieldType.INLINEHTML’, yet that produces an error when I use the following code snippet. Any ideas what I’m doing wrong?

    Code:
    var url = ‘Link‘;
    Thanks in advance.
    This is a cached copy. Click here to see the original post.

  • #17985

    MChammaTX

    This trick sometimes works. Try setting it to FieldType.TEXT and then setting the display type to inline and see what that does.

  • #17986

    k_dunc

    Really appreciate your suggestion. I tried the FieldType.TEXT option, but then got an ‘exceeded max field length’ error. I then tried FieldType.LONGTEXT, but got an ‘invalid type arg’ error. Any ideas what is causing this error?

  • #17987

    MChammaTX

    My suggestion is first make sure the solution will work, so replace the

    Code:

    result.getValue({ name: ‘custentity_pay_url’ })
    in your href with https://google.com. If that works then the issue will be with your field value. The text field is 300 characters so that should be plenty but if not try TEXTAREA. Also check if the field value is returning the raw url or whether it is adding html like an anchor tag.

You must be logged in to reply to this topic.