- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2015 01:09 PM
Are these nested queries where you are taking data from one record to then query data in another record or are they all separate queries? If the former, then you will need separate variable declarations. If the latter, then you can just do something like the following:
var bills = new GlideRecord('u_citnet_billing');
bills.addQuery('u_service_billing_profile.u_fund_to_credit', 'CONTAINS', 'NF');
bills.addQuery('u_billing_status','Ready for Billing');
bills.addQuery('u_billing_account',account);
bills.query();
while(bills.next()){
//perform some calculations
}
bills.initialize();
bills.addQuery('u_service_billing_profile.u_fund_to_credit', 'CONTAINS', 'IN');
bills.addQuery('u_billing_status','Ready for Billing');
bills.addQuery('u_billing_account',account);