Results 1 to 5 of 5

Thread: Customer html field using {ID}

  1. #1
    jne
    jne is offline Member
    Join Date
    Mar 2006
    Posts
    5

    Cool Custom html field using {ID}

    I am running Sugarcrm Open Source version 4.5 and am attempting to add a custom field of type 'html' in my Contacts view. This html code contains a URL of type

    Code:
    http://mylink.php?id={ID}
    and I was hoping that this would result in a link of type:

    Code:
    http://mylink.php?id=76c4fb47-74d3-d5b3-74f1-4329386gbb7b
    where 76c4fb47-74d3-d5b3-74f1-4329386gbb7b is the id of my contact. Unfortunately the {ID} variable is not interpreted and is just showing up as such in my URL.

    Any possibility to get this working (without having to hack the DetailView.html source code) ?

    Thanks in advance,

    PS: congratulations to the sugarcrm developpers team for adding the custom fields and improving the way to manage them !

    Jordi
    Last edited by jne; 2006-09-20 at 01:43 PM.

  2. #2
    jne
    jne is offline Member
    Join Date
    Mar 2006
    Posts
    5

    Unhappy Re: Custom html field using {ID}

    Mmmmm ... not a single reply yet. I can seriously use some help with this thing. Anyone able to guide me on the right path... i'd really appreciate it.

    Thanks, Jordi

  3. #3
    holzchines is offline Member
    Join Date
    Nov 2006
    Posts
    6

    Default Re: Customer html field using {ID}

    i have the same problem. i need the bug_id and account_id for transmitting it to an innerframe-src-attribute. i hope for help here.
    my backup-plan is to find the needed data somewhere in the html around my innerframe via javascript. in worse-case i can create some hidden fields, containing this data. but that solution isn't very beautifull...

  4. #4
    holzchines is offline Member
    Join Date
    Nov 2006
    Posts
    6

    Default Re: Customer html field using {ID}

    i got a solution:
    fist i tried to read, like written in my former reply, in my destination frame via javascript the data from the surrounding mainframe. there ist the important data stored in some hidden fields in the DetailView-Frame. But browsers can't read from one frame to another, when both frames aren't on the same domain.
    so i open my frame with a html-custom-field and created in addition a hidden div in the same html-custom-field. this hidden-div contain a formula witch targets my iframe. some hidden fields in my form are filled via java script with the current module and the recordid. the other fields of the module can be recieved via soap (all i need there is a recordid).

    html-custom-field-content-example:
    <div width="100%" align="center">
    <iframe name="fproject" width="800" height="600" src="http://xxx.xxx.xxx.xxx/myProject.php?mode=crm"></iframe>
    </div>
    <div style="visibility:hidden">
    <form action="http://xxx.xxx.xxx.xxx/myProject.php" method="post" name="project" target="fproject">
    <input type="hidden" name="mode" value="crm">
    <input type="hidden" name="prog" value="crm">
    <input type="hidden" name="mod" value="">
    <input type="hidden" name="record" value="">
    </form>
    <script language="JavaScript" type="text/javascript">document.project.mod.value = document.DetailView.module.value; document.project.record.value = document.DetailView.record.value;document.project. submit();</script>
    </div>

    with the myProject.php can i disply the information from other applications...
    it is important, that the java-script contains no cr/lf, because sugarcrm will replace them by "<br />" and this will cause a javascript error....
    it's not the straightes solution, but it is one

  5. #5
    remerg is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    15

    Default Re: Customer html field using {ID}


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •