CA Service Management

Expand all | Collapse all

add attachment tab on detail_cnt

Jump to Best Answer
  • 1.  add attachment tab on detail_cnt

    Posted 06-20-2018 02:22 PM

    Hi everyone,
    Currently, Im working with CA SDM 17, and I need to modify the user's web form.
    I want to add a tab so that users can attach documents

    currently I added the following code:
    ******************************************************************
    <PDM_IF "$args.id" == "0">
    <PDM_MACRO name=tab title="Attachments" height=300 id=attmnt src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=chg+PERSID=$args.persistent_id+NO_DP=yes"></pdm_tab>

    <PDM_ELSE>
    <PDM_MACRO name=tab title="Attachments" height=300 id=attmnt src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=chg+PERSID=$args.persistent_id+SDBP_FLAG=1"></pdm_tab>

    </PDM_IF>
    *************************************************************
    I copied this code from the detail_in web form. but it does not work.
    only, it shows me a text field


    Any ideas on how to modify this tab?

    Regards,
    Marco Velazquez.



  • 2.  Re: add attachment tab on detail_cnt

    Posted 06-21-2018 02:41 AM

    Hi Marco,

     

    You are trying to add attachments to cnt object, yet your code seems to reference the chg object. 

     

    <PDM_IF "$args.id" == "0">
    <PDM_MACRO name=tab title="Attachments" height=300 id=attmnt src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=chg+PERSID=$args.persistent_id+NO_DP=yes"></pdm_tab>

    <PDM_ELSE>
    <PDM_MACRO name=tab title="Attachments" height=300 id=attmnt src="OP=SHOW_DETAIL+HTMPL=xx_attmnt_tab.htmpl+FACTORY=chg+PERSID=$args.persistent_id+SDBP_FLAG=1"></pdm_tab>
    </PDM_IF>

    Please fix this as it is one of the reasons it not working.

     

    ===

    Kind Regards,

    Brian



  • 3.  Re: add attachment tab on detail_cnt
    Best Answer

    Posted 06-21-2018 08:27 AM

    Even if you correct this you are not going to get it work.

     

    The underlying datamodel objects and attributes do not exist!

     

    You need to create an object like this one :

     

     

    "lrel" object are used to store n to n relationship.

     

    Since a CNT can have several attachment and an attachment can be linked to different CNT, it's n to n.

     

    You will also need to edit xx_atmnt_tab.htmpl to take into account that there is a new object that can be linked to attmnt.

     

     

    And even after that, it may not work as I am not aware of all the prerequisite for SDM to start uploading attachment to a new object.

     

     

    It is not an easy customization.



  • 4.  Re: add attachment tab on detail_cnt

    Broadcom Employee
    Posted 06-21-2018 04:55 PM

    Pier is completely on point here. This is certainly possible, but is not something that can be accomplished through a simple form customization.



  • 5.  Re: add attachment tab on detail_cnt

    Broadcom Employee
    Posted 06-25-2018 09:28 AM

    Marcoaldama 

    Do you have any additional questions regarding this topic?

     

    If not, please mark one of the provided answers as Correct so that this thread can be closed.



  • 6.  Re: add attachment tab on detail_cnt

    Broadcom Employee
    Posted 06-25-2018 09:36 AM

    Hi Marco,

     

    Please note that this is pure customization and would be out of support scope.

    Test this out on one of your risk free environment and check the behavior before pushing for live action.