Comments (4)
Handling the notifications.
Example from ash on slack;
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
function genericResource() {
var itemGr = new GlideRecord("sc_req_item");
itemGr.addQuery("sys_id", current.sysapproval);
itemGr.query();
if (itemGr.next()){
var service = itemGr.variables.cscr_chooseService; //Providers
var provChoices = itemGr.variables.cscr_providerChoices; //Create generic provider/resource
if (service == 'Providers' && provChoices == 'Create generic provider/resource'){
template.print('<table border="1px solid black">');
template.print( "<tr bgcolor='#ddd'align='center'>" );
template.print("<td style='text-align:center;font-family:tahoma' colspan='10'><strong>Generic Provider/Resource</strong></td>");
template.print( "</tr>" );
template.print( "<tr>" );
template.print( "<td style='font-family:tahoma'><left><b>Department </b></left></td>" );
template.print( "<td style='font-family:tahoma'><left><b>Visit Type </b></left></td>" );
template.print( "<td style='font-family:tahoma'><left><b>Block </b></left></td>" );
template.print( "<td style='font-family:tahoma'><left><b>Duration(Minutes) </b></left></td>" );
template.print( "</tr>" );
var mrvs = itemGr.variables.generic_provider_resource;
var ritm = itemGr.getUniqueValue();
var rowCount = mrvs.getRowCount();
for (var i2 = 0; i2 < rowCount; i2++){
var row = mrvs.getRow(i2);
var deptGenTbl = new GlideRecord('u_mc_sched_dept');
deptGenTbl.get("sys_id", row.cscr_generictbl_dept);
var deptGen = deptGenTbl.u_display_name;
var visitTbl = new GlideRecord('u_mc_sched_sched_visit_type');
visitTbl.get("sys_id", row.cscr_generictbl_vsttype);
var visitGen = visitTbl.u_display_name;
var blockTbl = new GlideRecord('u_mc_sched_blocks');
blockTbl.get("sys_id", row.cscr_generictbl_block);
var blockGen = blockTbl.u_display_name;
template.print( "<tr>" );
template.print( "<td style='font-family:tahoma'><left>" +deptGen+ "</left></td>" );
template.print( "<td style='font-family:tahoma'><left>" +visitGen+ "</left></td>" );
template.print( "<td style='font-family:tahoma'><left>" +blockGen+ "</left></td>" );
template.print( "</tr>" );
}
template.print('</table>');
} else {
return;
}
}
}
genericResource();
})(current, template, email, email_action, event);
from jace.pro.
So in short;
MRVS issues;
MRVS do not access non MRVS content
MRVS do not allow UI Policies to hide variables
MRVS, until NY, were not shown in the summary
MRVS do not allow certain types of variables to be used. This is described better on DOCS
MRVS cascade on Order Guides is not supported (why are you using an order guide, nevermind... it is what it is)
MRVS in emails are weird
Server-side access to the MRVS is weird
MRVS summarizer is only available on Service Portal
from jace.pro.
from jace.pro.
Another interesting related from checksumfailed https://gist.github.com/ChecksumFailed/c6e62c133fd2ecefb4affe9f5d675bb6
from jace.pro.
Related Issues (20)
- Feature Request - RSS feed for the news HOT 1
- post/2020-05-22-all-the-shortcuts/ HOT 2
- Show code in addition to the screenshot of the code
- is it possible to use this end point mentioned in this post? HOT 3
- Some page have broken styling in the blog HOT 2
- post/2018-06-06-email-scheduled-reminders/ HOT 2
- post/2021-05-07-how-to-export-your-followers-from-twitter-right-now/ HOT 2
- Why extending a sys_user table is problematic HOT 1
- go over http://zoominsoftware.com/
- templates are better - write about this stuff
- post/2020-12-17-cloudflare-pages-netlify-zeit-github-pages-and-gitlab-pages-where-to-host/ HOT 9
- Mirroring choices from tables on catalog items HOT 1
- acl change to emails on activity streams with paris HOT 1
- Fuzzy time script
- How to include data in a scoped application HOT 1
- What is SUBQUERY HOT 1
- How to get the current shard for a table
- post/2019-01-12-kb-approvals/ HOT 2
- Adding Metrics to Scoped tables
- extension points
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jace.pro.