|
30.04.2009, 02:08 | #1 |
Участник
|
Jim Wang: Show both active and inactive records in the lookup view
Источник: http://jianwang.blogspot.com/2009/04...e-records.html
============== I had a post about how to return both active and inactive records in the Quick Find View. People then ask: how to show both active and inactive/deactivated records in the entity's Lookup View? CRM MVP Batistuta Cai already had a post about a plug-in solution. If the lookup entity is a system entity, you can also use this technique: Let's start from an example: you have a custom entity call: MyEntity, you have setup a N:1 relationship between MyEntity and Opportunity, so the user can see an opportunity lookup field on the MyEntity form. Now you want to show users both active and inactive opportunities from that lookup field, all you need to do is put the below code into MyEntity.OnLoad() event: crmForm.all.new_opportunityid.lookupclass = "alllookups"; The lookup class are controlled via xml files in %ProgramFiles%\Microsoft CRM\Server\ApplicationFiles\ If you take a look at the file: opportunity.xml, you may find a condition like: you can remove the condition, and then use this class, e.g: crmForm.all.new_opportunityid.lookupclass="opportunity"; However it's very much unsupported way(by changing files)! But if you open the file: alllookups.xml, you may find that the opportunity(object type="3") entity doesn't have such condition, so we can use this class to get all opportunities. Источник: http://jianwang.blogspot.com/2009/04...e-records.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|