on 03-17-2010 7:41 AM
Hi All,
I am adding an attachment (through coding ) to an UDO.
The attachemmt attaches fine but the Date Added field is blank and non editable.
Moreover I cannot find any APIs to fill this field with the current date.
As a result, my UDO does not get saved.
Please provide pointers to fill the Date Added field either automatically or through coding.
Regards,
Himanshu
Since there are no standard API's to set the date added field., you can use getExtensionField to set the date. The field ID for date Added within AttachmentSubIBeanIfc is "MODIFIED".
You can use this line of code to set the date added:
attachmentBean.getExtensionField("MODIFIED").set(TypeFactory.createSysDatetime(new java.util.Date()));
where attachmentBean is of type AttachmentSubIBeanIfc.
regards,
Immanuel
Edited by: immanuel farrar on Mar 23, 2010 5:42 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Himanshu -
Can you post your code? Are you creating the AttachmentIfc via the TypeFactory class? Then setting the file data? If you are using the standard attachments collection, you will need to create an element in that collection, set the attachments information, then, add that to the collection.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Himanshu,
I am trying to add an attachment into a document object.
Is there a standard API method that I can use.
If you could share your code on attachment adding, it would be very helpful.
Thanks & Regards,
Reshma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.