locked
Associated view of Many-to-Many Relationship RRS feed

Answers

  • Dolfi,

     

    try this:

     

    Code Snippet
    if(crmForm.FormType == 1)
    {
        document.all.IFRAME_polyiframe.src="about:blank";
    }
    else
    {
        document.all.IFRAME_polyiframe.src = "/" + ORG_UNIQUE_NAME+ "/sfa/accts/areas.aspx?oId=" + crmForm.ObjectId + "&oType=" + crmForm.ObjectTypeCode + "&security=852023&roleOrd=1&tabSet=areanew_account_new_polyclinic";
    }

     

     

     

    Jim
    Saturday, October 25, 2008 5:52 PM
    Moderator
  • Glad to now it works.

     

    In the picklist onchange event, you can:

     

    Code Snippet

    if(crmForm.all.new_picklist1.SelectedText == "Mining")

    {

        crmForm.all.tab4Tab.style.display = "none";

    }

     

     

    From left to right, the tabid start from 0, so tab0Tab is your first tab(General)...

     

    More information see my post: CRM how to hide field / label / line / section / tab

     

    Cheers,

    Jim

    Sunday, October 26, 2008 9:42 AM
    Moderator
  • Dolfi,

     

    Change the setting back, then in the account.onload event, put the following code:

    Code Snippet

     

    if(document.getElementById('navnew_account_new_polyclinic') != null)
    {
      document.getElementById('navnew_account_new_polyclinic').style.display = "none";
    }

     

     

    Cheers,

    Jim
    Monday, October 27, 2008 10:45 AM
    Moderator
  •  

    I know a Way to make it Auto-Refresh, but it's 100% unsupported. I don't know if someone already found a more supported way to auto-refresh the IFRAME.

     

    I overwrite the "onclick"-function of the "add existing polylinic"-button. That way I can see if the user has closed the add existing polylinic window or not.. And based on that, I refresh my "Iframe".. But it's really unsupported.. If someone has a better way for doing this Smile

     

    Kind Regards,

    Frederic

     

    Ps: in CRM3.0 you had the refresh=true function.. no?

    Friday, November 7, 2008 9:49 AM

All replies

  • You can do it by adding a IFRAME on the Polyclinic tab, and reference the url to the associated view.

     

    e.g, you add a IFRAME calls: IFRAME_1, in the Account.Onload event, you can:

     

    Code Snippet

    if(crmForm.FormType == 1)
    {
        document.all.IFRAME_1.src="about:blank";
    }
    else
    {
        document.all.IFRAME_1.src="/userdefined/areas.aspx?oId=" + crmForm.ObjectId + "&oType=" + crmForm.ObjectTypeCode + "&security=852023&tabSet=new_account_new_custom";
    }

     

     

    tabSet value is the relationship id between the custom entity and account entity.

     

     

    Hope it helps.

    Jim

    Friday, October 24, 2008 9:50 PM
    Moderator
  • Dear Jim,

    Thanks for your help. I've tried to implement your solution. Unfortunately, when I try to load an Account the Iframe show error message as below
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/error1.jpg

    The Onload method is placed on form customization window, isn't it? Below is my code. Is there any code i miss?
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/error2.jpg

    FYI, below is my IFRAME Setting. Is it correct?
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/error3-konfigurasiiframe.jpg

    When you see my code, you'll notice the alert(); line. This is used to show up the url. And below it the result.
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/error4-.jpg


    Do you know what it might be wrong?
    Thanks

    Regards,
    Dolfi
    Saturday, October 25, 2008 3:13 PM
  • Dolfi,

     

    try this:

     

    Code Snippet
    if(crmForm.FormType == 1)
    {
        document.all.IFRAME_polyiframe.src="about:blank";
    }
    else
    {
        document.all.IFRAME_polyiframe.src = "/" + ORG_UNIQUE_NAME+ "/sfa/accts/areas.aspx?oId=" + crmForm.ObjectId + "&oType=" + crmForm.ObjectTypeCode + "&security=852023&roleOrd=1&tabSet=areanew_account_new_polyclinic";
    }

     

     

     

    Jim
    Saturday, October 25, 2008 5:52 PM
    Moderator
  • Hi Jim,

    Thank you, it works.

    What's the differences between 1st code and 2nd code?

    Anyway, May I ask you one more question please...

    We have several kind of customer. There are mining, medical, and software. Each of it has a specific tab. This is defined by industry field as below.
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/possibility.jpg
    Is  it possible to hide the tab that are not needed? (i.e. When Industry field is Mining, then only mining tab is shown- medical tab and software tab are hidden).
    If it is, please tell me how.

    Thank you very much
    Sunday, October 26, 2008 7:20 AM
  • Glad to now it works.

     

    In the picklist onchange event, you can:

     

    Code Snippet

    if(crmForm.all.new_picklist1.SelectedText == "Mining")

    {

        crmForm.all.tab4Tab.style.display = "none";

    }

     

     

    From left to right, the tabid start from 0, so tab0Tab is your first tab(General)...

     

    More information see my post: CRM how to hide field / label / line / section / tab

     

    Cheers,

    Jim

    Sunday, October 26, 2008 9:42 AM
    Moderator
  • Thanks Jim,

    Can we back to the IFrame please...
    After associated view of polyclinic is successfully shown on the IFrame, I remove the  polyclinic menu under the detail (left pane)
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/relationship1.jpg
    by setting the many to many relationship as below:
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/visibility.jpg

    But now I noticed that by doing so, the polyclinic entity is not shown on the account's advance view.
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/visibility2.jpg

    Is it possible to not showing Polyclnic menu under accoun'ts Detail (left pane) but still visible on the account's advance menu?

    Please help...
    Many many many thanks

    Regards,
    Dolfi


    Monday, October 27, 2008 3:45 AM
  • Dolfi,

     

    Change the setting back, then in the account.onload event, put the following code:

    Code Snippet

     

    if(document.getElementById('navnew_account_new_polyclinic') != null)
    {
      document.getElementById('navnew_account_new_polyclinic').style.display = "none";
    }

     

     

    Cheers,

    Jim
    Monday, October 27, 2008 10:45 AM
    Moderator
  • Wow..,

    Thank you very much Jim.
    You are so helpfull.

    Let me try  the solution. I just wanna confirm whether account.onload event located on the same place with the code form.onload (IFRAME code above)

    Regards,
    Dolfi.
    Monday, October 27, 2008 3:12 PM
  • Hi Jim,

    One more question about IFrame please...
    After I "Add Existing Polyclinic",  I realize that we need refreshing the list to see the changes.
    http://i51.photobucket.com/albums/f381/organisme/Kerjoan/CRM/autorefresh.jpg
    Is it possible to make it auto refresh each time we finish adding Existing Polylinic?

    Thank you
    Wednesday, October 29, 2008 7:26 AM
  •  

    I know a Way to make it Auto-Refresh, but it's 100% unsupported. I don't know if someone already found a more supported way to auto-refresh the IFRAME.

     

    I overwrite the "onclick"-function of the "add existing polylinic"-button. That way I can see if the user has closed the add existing polylinic window or not.. And based on that, I refresh my "Iframe".. But it's really unsupported.. If someone has a better way for doing this Smile

     

    Kind Regards,

    Frederic

     

    Ps: in CRM3.0 you had the refresh=true function.. no?

    Friday, November 7, 2008 9:49 AM
  •  Frederic D. wrote:

    And based on that, I refresh my "Iframe"..


    Kind Regards,

    Frederic




    How do you do that? can you describe it more details please..?
    Sunday, November 9, 2008 4:54 PM
  • I'm having the same problem and cannot find a way to resolve this. Does anyone has an idea how to do it? What about overwriting the onclick method? How is this done? In which event/form has the method to be overwritten?

     

    I'm completly lost in finding a way to get rid of pressing the refresh button after editing a many-to-many relationship inside an Iframe.

     

    Thanks for any help.

     

    Stefan

    Wednesday, December 3, 2008 2:12 PM