cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Is there a way to programmatically set a user windchill preference?

BrianKrieger
10-Marble

Is there a way to programmatically set a user windchill preference?

No luck so far with the service (PreferenceService2) setvalue methods.  I see they are there but I must be misreading the method signatures.  I'd like to try to allow the users to set preferences through a web page (to enable other validation, etc. niceties).

2 REPLIES 2

Ah.  So right wrong or indifferent, setting preference worked with:

   PreferenceHelper.service.setValue("<INTERNAL PREFERENCE NAME>","<CLIENT NAME>", "<UPDATED VALUE>", <CURRENT WTUser>);

But (FYI) I don't see this as a supported call according to the javadocs.....

Brian Krieger‌,

I've been using PreferenceHelper.service for a year in 10.2 M030.  It is called nearly daily.

You're right - it is not marked as supported.  But it seems to be working.  Just do careful testing whenever upgrading.

Shirishkumar Morkhade‌‌ and I put some code around this for both getValue() and setValue() back in February 2016.  My support case is C12653301.  I know you can't view that ... but Shirish could view if he wanted to refer back to it and add anything else to this message.

Announcements

Top Tags