How to remove existing attribute from DTO - sap-commerce-cloud

How can I remove existing attribute from DTO for example 'name' from ProductData. and is it possible? is the solution somewhere at my customextension-beans.xml ?

Related

My destination field is the same name but with a prefix, how to map automatically

The DTO object has nearly the identical field name however without prefix 'db_' in it, e.g. my database entity field 'db_firstname' my dto name 'firstname', how do I tell automapper to automaticaly map it, instead I manually write 200 lines.. thanks
You need RecognizePrefixes. The docs are here.

Update Metadata Property of an Attribute in CRM 4.0

Can I update IsValidForAdvancedFind property for an attribute in metadata in a supported way. At present I have an attribute which I dont want to show in advanced find view.
Please help!
The following link contains all you need to know about making an attribute none – searchable
http://mscrmtools.wordpress.com/tools/searchable-property-attribute-updater/
There are several ways to update IsValidForAdvancedFind attribute but not every attribute of any entity can be updated. Can you please share which attribute from which entity do you want to update?

Adding custom Field to doctrine object in Controller

I have a symfony2 Project with an Account entity. It has two attributes id and description.
In my Controller i want to enrich my doctrine Objekts with a further field called name. This property will not be persisted and is only used in my twig template. In twig i want to use {{Account.name}}.
How can i assign values to my objects in my controller that can be used in the twig file?
Thanks, greets mike
oh, its actually so easy :-)
i can simply add
$entity->myproperty = "whatever i want";
and then in my twig template i use
{{entity.myname}}
thanks anyway... i did not know that i can assing properties to my objects like this.

how to fix collection add element error in Openxava 3.1

org.openxava.util.XavaException:cannot add new element in collection because an entity property is readonly..but i did not put a property readonly inside my entity class.
IT WAS A TYPE MISTMATCH PROBLEM. WHEN I LOOKED CLOSELY TO THE CODE AND PUT THE CORRECT TYPE FOR THE ENTITY PROPERTY...IT WORKS!!! IM ABLE TO ADD ELEMENT TO THE COLLECTION.

Pre-allocation of attributes by creating new entity

While creating new entity in CRM, some fields will be pre-allocated. Exmaple: for a new contact - transactioncurrency and ownerid will be filled with values. Haw can I programmatically find out, which rules will be used for such pre-allocation. I can't call "initializefromrequest" to find it out, because I want to build offline DB and there apply the rules
thanks
Get the EntityMetadata for your entity then examine AttributeMetadata for each Attribute to determine if the IsCustomAttribute Property is true
Retrieve Entity metadata using EntityFilters = EntityFilters.Attributes
Iterate the Attribute collection of the EntityMetadata in the response
Check the IsCustomAttribute property on each AttributeMetadata

Resources