Notifications
Announcements
No record found.
function CustEntity1_refresh(executionContext){ var formContext = executionContext.getFormContext(); var Custentity2 = formContext.getAttribute('Cust_entity2').getValue(); // get the subgrid controlvar subGridControl = formContext.getControl(/Case_CustEntity1/);// get the view associated with the subgrid control//var viewId = subgridControl.getViewId();var custEntity2Id=Custentity2[0].id;alert(custEntity2Id);custEntity2Id=custEntity2Id.replace(/{/,//);alert(custEntity2Id);custEntity2Id=custEntity2Id.replace(/}/,//);alert(custEntity2Id);// set the fetchxml query for the view, filtering based on your criteria var fetchXml = /<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>/+/<entity name='cust_entity1'>/+/<attribute name='cust_name' />/+/<attribute name='cust_entity2' />/+/<attribute name='createdon' />/+/<attribute name='cust_entity3' />/+/<attribute name='cust_entity1Id' />/+/<order attribute='cust_name' descending='false' />/+/<filter type='and'>/+ /<condition attribute='statecode' operator='eq' value='0' />/+/<condition attribute='cust_entity2' operator='eq' uitype='cust_entity2' value='/+ custEntity2Id.toLowerCase() + /'/>/+ /</filter>/+/</entity>/+/</fetch>/;alert(fetchXml);// set the view XML of the subgrid with updated filter criteriasubGridControl.setFilterXml(fetchXml); formContext.getControl(/Case_Custentity1/).refresh();alert(formContext.getControl(/Case_Custentity1/).getFetchXml());}function callBackFunction(result) {if (result == 'success') {} else {} }
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 72 Super User 2025 Season 2
Daniyal Khaleel 32 Most Valuable Professional
Gerardo RenterÃa Ga... 29 Most Valuable Professional