How to overcome this error in Hybris during category insert
I get this error:
You have not entered a value for Identifier field. It is defined as the unique code of the category. If you see the error message, it mentions "missing values for [code]"
While creating a new Category through HMC in Hybris, the following three attributes are necessary to be entered:
Identifier (the unique code of the category)
Name (the name of the category)
Catalog Version (the catalog version the category belongs to)
Related
I just took over a project from a developer who has already left an organisation and I'm doing some maintenance work in the project. I can see the following code in a custom web part
CurrentUserInfo CurrentUser = MembershipContext.AuthenticatedUser;
DateTime ExpirationDate = CurrentUser.GetValue("aps_expirationdate", DateTime.Now);
The strange thing is, I cannot seem to find this custom field 'aps_expirationdate' anywhere in the system or in the database.
I checked the following places but couldn't find it.
Checked Membership module 'User' class and 'User - Settings' class
Checked 'User' module
Did a manual Sql Search in the database to find a table with a column name 'aps_expirationdate'
but I cannot seem to find this column anywhere and the other strange thing is, when I debug the code it does return a date value. No bugs in the code so, cannot say that this is an invalid column name. Where else should I look?
Based on what you've put in your initial question, it sounds as if the column was added manually and not through the Kentico UI. In order for the data access layer or the Kentico API to know that field exists, the definition has to be stored within the Kentico module class and not just in the database.
Here's what I'd do to correct this:
Find what table the field exists in. If you want the custom field to be part of the User or User Settings objects then they need to be added to either the CMS_User or CMS_UserSetting table.
If the field does not exist in either the CMS_User or CMS_UserSetting table, then go to the Modules app in the Kentico UI.
In the Modules App, go to Membership > Classes > Users > Fields and add the aps_expirationdate field.
If you have data in the field aps_expirationdate in the other table, write a query to copy it from the other table to the CMS_User table.
Now the API call as noted above will work.
If the field is already in the CMS_User or CMS_UserSetting table, then you will have to do the following:
In SSMS, rename that field to aps_expirationdate_old.
In the Modules App, go to Membership > Classes > Users > Fields and add the aps_expirationdate field.
Assuming you have data in the aps_expirationdate_old field in the CMS_User or CMS_UserSetting table, write a query to copy it from the other table to the CMS_User table.
Your last bullet point states you "Did a manual Sql Search in the database to find a table with a column name 'aps_expirationdate'". This contradicts what you state at the end of your question which states "I cannot seem to find this column anywhere". If you cannot find what table the aps_expirationdate exists in, then check out the following SO answer to find that column in a given database.
https://stackoverflow.com/a/4849704/698678
For some products I need to change the price in ProductCockpit. If I change the price in ProductCockpit Staged Version the change is directly displayed on site,without doing synchronizing from Staged to Online Catalog.What can I do to make it available for Staged first and then after doing synchronization to Online.
PriceRows offer 2 methods to identify a product.
Reference to a specific product in a specific CatalogVersion using the attribute "product" of type Product. This will match a product in a single CatalogVersion (e.g. "Staged").
Identify a product by its code using the attribute "productId" of type String. This will match a product in all CatalogVersions (e.g. "Staged" and "Online").
Check which one you are using and change to the reference version, if you would like to change prices only for a specific version.
If I create a new category it will store in AssestCategory table.At the same time entry should be in AssestEntry table also.For mapping between these two tables we have AssestEntries_AssestCategories table.How to achieve above thing by programmatically because for mapping table I didn't get any API.by these tables shall I get userIds associated with particular category. Or let me know is there any other way.
A new entry stored in AssetCategory when a category is created for a topic in site.
For example, Create a category named "Test Category" in site. You will see an entry in AssetCategory table. But there will not be any entry get stored to AssetEntries_AssetCategories table.
When the category is associated with some data item, then its association is stored in AssetEntries_AssetCategories table.
For example, When you create a bookmark with "Test Category" selected, then a new entry stores in AssetEntries_AssetCategories table.
entryId in AssetEntries_AssetCategories represents the corresponding entry for AssetEntry table.
In liferay Asset framework, liferay-ui:asset-categories-selector tag can be used to provide Asset category selection.
Please refer below links for details of liferay asset framework and to implement the same for a custom resource.
https://www.liferay.com/en_GB/documentation/liferay-portal/6.2/development/-/ai/asset-framework-liferay-portal-6-2-dev-guide-06-en
https://dev.liferay.com/develop/learning-paths/-/knowledge_base/6-2/enabling-assets-at-the-service-layer
thank first all to helping me, out
I have got a big problem
I trying to run a post operation plugin in crm 2013
I have got, to Entities One is "account" and the other one is "sales"
My problem is :
The filed in entities account is lookup filed
And the filed in sales is text filed
The value from the sales Test filed I have to add in the look up filed
I have allready retrieve the value from the sales test field
Only problem is I can’t add the value in the look up:
get an error message.
It would be appreciated if you can share the error message which you are getting.
Assuming that you are trying to set the primary contact for the account, I would have coded as follows,
Entity account=new Entity("account");
account.Id=;
account["primarycontactid"]=new EntityReference("contact",);
service.Update(account);
In this case i again assume the text value which you have retrieved is a Guid value. If not, get that value from CRM using a service.Retrive() or service.RetrieveMultiple() methods and do it as above.
Hope this helps!!!.
I am trying to create a custom Audit summary report based on a date range that needs to be emailed nightly. I've got most of it working, but need some help with getting the primary name/field/attribute for a referenced entity. I noticed in the Audit view for a referenced entity, the data is stored like 'systemuser;'. What I would like to do is grab the Primary Field (Primary Name, Primary Attribute, whatever it's called) to display on the report. Does anyone know how to find the Primary Name attribute for an entity using the MetadataSchema views in the CRM SQL database? I have found the Primary Key field by looking at the MetadataSchema.Attribute.IsPKAttribute field, but I don't see anything for the Primary Name field.
Also, I am grabbing the current values from the entities if there are no following audit entries. For the lookup fields (like owner or customer) how can I tell from the Metadata what field stores the ObjectTypeCode? For example, if I was looking up the customer on a sales order, I know I can look at CustomerIdType field to find the ObjectTypeCode, but I need to find that the field is called CustomerIdType from the metadata.
If anyone has any good references on the Metadata from the SQL side of CRM, I would greatly appreciate it.
SQL query to get primary fields for all entities
SELECT e.Name as 'entity', a.Name as 'primary field'
FROM [dbo].EntityView e
left join [dbo].AttributeView a on e.EntityId = a.EntityId
where (a.DisplayMask & 256) > 0 --256 is for primary field
order by e.name
There are two cases to get object type code of lookup
append Type to field name (i.e. CustomerIdType)
if above is not available, get it from AttributeMetadata
SELECT ReferencedEntityObjectTypeCode
FROM [Discworld_MSCRM].[dbo].[AttributeView]
where name = '<field name>' and entityid = '<entity id>'
I'm not sure what exact rules are for Type fields to exist