Hi All,
Is there any way we can set cascading lookup in field service mobile application by using OOB or javascript?
Any help would be appreciated.
Thanks,
Shahbaaz
Hi Shahbaz,
Did you apply correctly the filter on Contact field?
In my case, I can see all contacts associated to the selected Account on lookup field and not just primary contact.
Check also if there is any additional filter applied on the view in contact entity.
Regards,
Shayan
Hi Shayan,
It is just showing me the primary contact in the filter contact lookup, but i want all the related record to that account, not just the primary contact.
Thanks,
Shahbaaz
thank you very much for the answer
Hello Shahbaz,
Please follow these steps,
In my case I have two fields for Account (Account & Account2) and two fields for Contact (Contact & Contact2), I just filtered the field Contact2 based on the field Account2.
1- In Woodford, double click on the field that you want to filter.
2- Click on "Edit Filter"
3- Insert the condition, (Company Name on contact form is a lookup on Account entity)
4- In the Select entity field, click on "Set Variable"
5- and Select the preferred Account field.
6- Save and Publish
In my case, once I select a value for Account2, then the field Contact2 shows me just those contacts associated to Account2.
You can apply the same filter also for your Account1/Contact1
Hope this helps,
Regards,
Shayan
I Have two lookup Account(Partner account) and contact(Partner contact), on selecting of account i need to filter contact(it show display contact related to that account selected)
Regards,
Shahbaaz
Can you please provide screenshot what exactly do you need?
i tried below javascript, it filter the record and show in popup, but i dont want popup,
// var lookupForm = new MobileCRM.UI.LookupForm();
// // HOW TO ADD ADDITIONAL FILTERING TO LOOKUP FORM.
// var customXMLView = "<fetch version='1.0'><entity name='contact'><filter type='and'><condition attribute='parentcustomerid' operator='eq' value='"+ account_id +"'/>"+
// "</filter></entity></fetch>";
// lookupForm.addEntityFilter("contact", customXMLView)
// lookupForm.addView("contact", "Default");
// lookupForm.allowNull = true; // Allow choosing empty value
// lookupForm.show(function(accountRef)
// {
// /// <param name="accountRef" type="MobileCRM.Reference"/>
// // Change the parent customer on currently edited contact entity
// MobileCRM.UI.EntityForm.requestObject(
// function (entityForm) {
// /// <param name="entityForm" type="MobileCRM.UI.EntityForm"/>
// var editedContact = entityForm.entity;
// var newContact = accountRef ? new MobileCRM.Reference(accountRef.entityName, accountRef.id, accountRef.primaryName) : null;
// editedContact.properties["ewt_partnercontact"] = newContact;
// },
// MobileCRM.bridge.alert
// );
// }, MobileCRM.bridge.alert, null);
thanks Andrew for the reply,
is there a way to do it by using javascript?
here i have two entity account and contact, on selecting account from lookup i need to filter contact lookup.
Thanks,
Shahbaaz
Hello,
Do you mean filtered lookup? If yes - you can use OOB approach - sumedha8.blogspot.com/.../filtered-lookup-in-resco-mobile-app.html
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,802 Super User 2024 Season 2
Martin Dráb 229,129 Most Valuable Professional
nmaenpaa 101,154