on 09-06-2006 3:14 AM
Hello everyone:
I need to create a new record, but it has both fields and attributes. I know that I need to create the record first:
// assume the fields are already in place, as well as connection:
A2iFields fields = new A2iFields();
id= mdmConnector.AddRecord("Materials", fields, 0, 0);
but I have not found a way to fill not only the fields, but also the attributes, as the Materials table has a Category field, with this, having some specific attributes related to each category.
Any ideas?
Thanks!
Hi,
You must first create the record, specifying the category, and then add attributes using the UpdateRecordAttributes method. Here's the javadoc for it.
public int UpdateRecordAttributes(java.lang.String table,
java.lang.String field, int recordID, AtributeValueExArray modifiedAttributes, int inChangeStamp) throws StringException
Updates attribute values for the specified record.
Parameters:
table - the table name.
field - the taxonomy field in the specified table.
recordID - record ID of record whose attributes are to be modified.
modifiedAttributes - the list containing name/value pairs of attributes to be updated.
inChangeStamp - the last known change stamp of the record.
Returns: the new change stamp.
Throws: StringException - such as a loss of connection to the server
Hope this helps,
Richard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.