COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => SDK => Topic started by: CommandoCognos on 06 Aug 2012 06:47:43 AM

Title: Set contact/e-mail of object?
Post by: CommandoCognos on 06 Aug 2012 06:47:43 AM
Hi,

I'm running into a problem with an IBM Cognos 8.4 SDK application where I plan to add a method to set the contact of any object from the Content Store. In Cognos Connection you can assign a user from the Directory Server or enter an E-Mail Address in the objects properties. I was successful in setting the Owner of a report for instance but I don't see any method for the contact (must be part of the account class !?). There are suitable PropEnums (PropEnum.owner/PropEnum.contact) for it but only the owner methods are obvious further on (get/set owner)...

Is there someone out there who can provide the approach for this? I'm an advanced SDK user but I get stuck finding the proper method.

Thanks a lot in advance,
Timm
Title: Re: Set contact/e-mail of object?
Post by: murali999 on 15 Aug 2012 07:46:51 AM
Hi Timm,

you can set the contact for the report object with the setContact and setContactEMail methods

r.setContact(Account)  // here 'r' is the report object and 'Account' is the Accountobject
// you can set the  contact email with
StringProp contactEMail=new StringProp();
contactEMail.setValue("Email Address");
r.setContactEMail(contactEMail)  ; // here 'r' is the report object


Regards,
Murali.
Title: Re: Set contact/e-mail of object?
Post by: CommandoCognos on 11 Sep 2012 07:54:47 AM
Hi Murali,

thanks a lot. That is exactly what I was looking for.

Thanks again and best  regards,
Timm