on 08-21-2007 4:54 AM
Hi All,
My problem is with MDM and Java APIs below is my requirement
I have a,
Main table name : Products
Lookup table name : Details
Lookup table has one qualifier and one non qualifier field.
I have to insert a record into the Products table, iam able to enter the values for the normal fields like text, integer etc. But not able to enter the lookup record. Can you please let me know how this can be achieved, also if u have any sample code for this it would be of great help.
Hi Suresh,
I assume you need to add one record to the Qualified table you have and link this record to the main table.
I dont have any sample code with me right now but I will just describe the steps here:
1. Create Main Table record ( which is I think you have done )
2. Create Record in Qualified Table ( similar process to create record, but you can specify only "No" qualifiers field while creating the record, as the fields with "YES" qualifier doesnt exist till the time you create a qualified link. )
3. Create a Qualified Link between main table and qualified table and specify the values of "YES" qualifiers
( This can be done, with the use of QualifiedLinkArray, QualifiedLink class and further CatalogData.AddQualifiedLinks method )
Please try to get hold of the above mentioned classes, I will post a sample code if I manage to find it.
Thanks and hope it helps you.
Mausam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mausam,
Thanks for the reply, I tried following those steps please see the code below, it is still not working..
I have added a record into the main table and the record id is stored in the variable <b>"id"</b>
Now iam doing the following steps
//"Products" is the main table
//"details" is the lookup table entry in the main table
<b>//Create a Qualified Link between main table and qualified table</b>
QualifiedLinkArray qualifiedLinkArray = new QualifiedLinkArray();
QualifiedLink qualifiedLink = new QualifiedLink();
<b>// specify the values of "YES" qualifiers</b> Value val = new Value("Dev");
A2iField sd = new A2iField("Name", val);
qualifiedLink.GetQualifiers().Add(sd);
qualifiedLinkArray.Add(qualifiedLink);
int changeStamp = rs.GetChangeStampAt(id);
catalog.AddQualifiedLinks("Products", "details", id,qualifiedLinkArray, changeStamp);
<b>But Iam not inserting the values of "NO" qualifiers anywhere.. have i missed out any steps??</b>
Please help..
Regards
Suresh
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.