Jump to content
utkua

Attachment for custom object

Recommended Posts

Dear experts,

I try to make some customization for attachment to a custom object. I have CA SDM 17.1

I tried to make it like customization made for nr on SDM 12.5. But it doesn't work.

I created a lrel object  and maj file. Please find below. I couldn't solve the issue, what might be missing here?

Factory zcustomatt
   id                   INTEGER
   producer_id          LOCAL STRING(20)
   persistent_id        LOCAL STRING(60)
   att                  SREL -> attmnt.id REQUIRED
   obj                 SREL -> zcustomobj.id REQUIRED
   last_mod_dt          DATE
   last_mod_by          SREL -> cnt.id

 

OBJECT zcustomobj { 
   ATTRIBUTES zcustomobj  { 
       attachments BREL zcustomatt zcustomobj{ LREL attmnt; };
   };
};

OBJECT attmnt { 
   ATTRIBUTES Attachment  { 
       objs BREL zcustomatt attmnt { LREL zcustomobj; };
   };
};

 

BR

Utku

Share this post


Link to post
Share on other sites

Tryed and it works without any deep customization, just used schema from the topic.

Here is correct syntax for factory called "zobj"

WSP:
z_lrel_attachments_objs:
	attmnt SREL attmnt
	zobj SREL zobj
// z_attmnt_obj.maj
OBJECT zobj {
	ATTRIBUTES zobj {
		attachments BREL z_lrel_attachments_objs zobj {
			LREL attmnt;
		};
	};
};
OBJECT attmnt {
	ATTRIBUTES Attachment {
		zobjs BREL z_lrel_attachments_objs attmnt {
			LREL zobj;
		};
	};
};
// xx_attmnt_tab.htmpl
function att_tab_src() {
  // ootb factories by pdm_elif
  // ...
  <PDM_ELIF "$prop.factory" == "zobj">
      att_tab_url += "+QBE.EQ.zobjs.zobj.id=$args.id";
  // ...
}

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

 

Edited by cdtj

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...