掲示板

Deleting Expando fields programmatically.

thumbnail
1年前 に Tanweer Ahmed . によって更新されました。

Deleting Expando fields programmatically.

Expert 投稿: 322 参加年月日: 10/03/11 最新の投稿
Hello,
I have a list of users, each having a set of expandos(custom fields).Can I delete these expandos based on the userId.That means I want to delete the custom fields only for few of the users whose userId I know.

Any Suggestions.Thanks in advance.

Hope this helps,
Regards,
Tanweer
mPowerian-BoschLer
thumbnail
12年前 に Ali Shahrami によって更新されました。

RE: Deleting Expando fields programmatically.

Junior Member 投稿: 52 参加年月日: 09/08/01 最新の投稿
Tanweer,

You can delete Expando value using one of the following methods:


ExpandoValueLocalServiceUtil.deleteValues(classNameId, classPK);
ExpandoValueLocalServiceUtil.deleteValues(className, classPK)
ExpandoValueLocalServiceUtil.deleteValue(classNameId, tableName, columnName, classPK)

You can get "classNameId" and/or "className" from ClassName_ table. classPK is the same as userId.

Ali
thumbnail
1年前 に Tanweer Ahmed . によって更新されました。

RE: Deleting Expando fields programmatically.

Expert 投稿: 322 参加年月日: 10/03/11 最新の投稿
Ali Shahrami:
Tanweer,

You can delete Expando value using one of the following methods:


ExpandoValueLocalServiceUtil.deleteValues(classNameId, classPK);
ExpandoValueLocalServiceUtil.deleteValues(className, classPK)
ExpandoValueLocalServiceUtil.deleteValue(classNameId, tableName, columnName, classPK)

You can get "classNameId" and/or "className" from ClassName_ table. classPK is the same as userId.

Ali


Hi Ali,
Thanks for the response. This code will only delete the values for the custom field.I was actually looking to delete the custom field itself based on the userId.

Regards,
Tanweer
mPowerian-BoschLer