Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

CRM Mobile offline - AddCustomerFilter to lookup doesnot work in offline mode

Posted on by

Hi,

Has anyone tried filtering the lookup in the offline mode on the mobile forms? The below javascript functions works in online but when i switch to offline mode, it does not work. It shows all the records in the lookup rather than based on the filtercondition that i applied. Any suggestions or work around are welcomed. 

Xrm.Page.getControl("fieldName").addCustomFilter(filterCondition);

Xrm.Page.getControl("fieldName").addPreSearch(filterFunction);


P.S : I have enabled the lookup entity to offline.


*This post is locked for comments

  • Suggested answer
    awad Profile Picture
    awad on at
    RE: CRM Mobile offline - AddCustomerFilter to lookup doesnot work in offline mode

    Hi all,

    Thanks for your responses. Actually i figured out after i got the tip after going through this tip

    As per the tip above, In the 2015 CRM Mobile App version, the lookup filter in mobile works on the primary field i.e name field of the entity.

    But In the latest 9.1, its changed it works for all the fields.  so my filter condition was

    <filter type="and">' + '<condition attribute="studentInfoId" operator="eq" value="' + StudentInfoId+ '" /> </filter>
    
    

    and it works well in the CRM Mobile App in Online mode. but when i was going offline, the above filter was not applied to lookup.

    So i used by senses after reading the tip above and applied filter on primary field i.e name field and it worked absolutely fantastic. 

    So take from this is, In the offline mode, the Filter Condition should be on the primary field of the entity. and it preSearch filter will not work if the filter is other than primary field in offline mode. 

  • awad Profile Picture
    awad on at
    RE: CRM Mobile offline - AddCustomerFilter to lookup doesnot work in offline mode

    Thanks for your reply. We are using CRM Online Version 9.1.

    Its working on the Mobile app when the app is online. but when i am switching to offline. it does not filter, even though i have enabled the lookup entity in offline mode and data exists in offline.

  • Inogic Profile Picture
    Inogic 24,094 on at
    RE: CRM Mobile offline - AddCustomerFilter to lookup doesnot work in offline mode

    could you confirm the CRM version you are using. Do note that custom filter is not supported in Unified Interface (UCI). The mobile app i believe use the UCI interface.

    Please mark as verified if the answer is helpful.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans