pravinnalkande - Tuesday, December 27, 2011 8:18 AM:
Dear All,
Actually I want to delete the the instance created but I am not getting the ID of instance in IOM.
Please tell me another way to get instance ID.I have written following code to get instance ID in c#
Innovator inn=this.getInnovator();
string getIDVal=this.getProperty("id");
So in above code I am unable to get the value of string getIDVal, it gives me blank value.
Regards,
Pravin
gkhn.topcu - Tuesday, December 27, 2011 8:38 AM:
Maybe it will works;
string id = getID();
vishal_trivedi - Wednesday, December 28, 2011 1:01 AM:
Hi Pravin,
If you are deleting an item which is having multiple versions then it will return comma separated list of ids.
so you can get the id by,
String ids = this.getProperty("idlist");
It will give you the correct list of ids separated by comma.
The last id in that comma separated list is the id of the current item.
So, you can extract that id and can work.
This will definitely work.
Cheers,
VishaL
pravinnalkande - Tuesday, December 27, 2011 8:44 AM:
Hi Dear,
I have tried using string id=getID(); but still get blank value.
Regards,
Pravin
pravinnalkande - Wednesday, December 28, 2011 1:06 AM:
Thanks Vishal.
It works. Nice solution.
Cheers,
Pravin
souheil - Tuesday, December 27, 2011 10:29 AM:
In order to get the id of the item, you must have the item. You either get the item using a criteria or you must have created the item at some time. Once you have the item this, then you can use this.getID(); I hope this is helpful