The DocuSign custom button does not route as per the order. See the button code below. The envelope goes directly to the second order and skipping the first one.
{!URLFOR('/apex/dsfs__DocuSign_CreateEnvelope', null, [
SourceID = HealthCloudGA__CandidatePatient__c.Id,
CRL = 'Email~' + HealthCloudGA__CandidatePatient__c.OwnerEmail +
';FirstName~' + HealthCloudGA__CandidatePatient__c.OwnerFirstName +
';LastName~' + HealthCloudGA__CandidatePatient__c.OwnerLastName +
';RoutingOrder~1;Role~Signer1'+
'Email~' +
HealthCloudGA__CandidatePatient__c.Primary_Treating_Physician_Email__c +
';FirstName~' +
HealthCloudGA__CandidatePatient__c.Primary_Treating_Physician__c
+';RoutingOrder~2;Role~Signer2',
DST = '5b651cdc-7553-4dd6-bd2b-7aad33aa84a4',
LA = '0',
LF = '0',
OCO = 'Send'
]
)}
It should go to first person and once the first person sign the form then it should go to second person.
You are using a template (DST=) and your template overrides the definitions of the recipients. You should either not use a template, or change your template definitions to what you want.
Related
I would like to filter the POIs added to my map tiles to some category but I don't understand how to move from the POI categories available in the meta-data to the hexadecimal filter. The example provided in the developer documentation is too simple.
For example if I want to have only city halls (category 323), which value should I put for the pois attribute of my request?
And if I want to combine it with Fire Departments (category 246)?
Thank you for your help
The hexadecimal value for city halls (category 323) is 000000000000000000000000000000000000000000000000000000000000000000000000000000001.
For Fire Department (category 246) it is 00000000000000000000000000000000000000000000000000000000000002.
You can use the map table (provided in the link) in your program code or you can calculate the HEX values in runtime utilize this code snippet:
// 1. get poi categories /meta/pois?output=json and store them in a list
// 2. create a list with inputs of type checkbox
// 3. create a 'change' listener that includes the following logic
var bit, bits = '0', hex = '', n=1;
// please pay attention as the index starts on '1' as the
// first bit is always initialized to '0' because it is a reserved bit
$('.poi').each(function {
bit = $(this).is(':checked') ? '1' : '0';
bits = bits + bit;
if ((n+1)%4 == 0)
{ hex = hex + parseInt(bits, 2).toString(16); bits = ''; }
n = n + 1
});
if (bits !== '') hex = hex + parseInt(bits, 2).toString(16);
// we remove the trailing zeroes as they are not needed
hex = hex.replace(/0+$/g, '');
// trigger a map update using the parameter &pois=hex
My rank command is working fine, iv been trying to add the ability to !rank #user. As you can see i have code there to grab the mentioned user, so it will display the mentioned users name and profile pic but my points (because they are requested from message.author) I'm just unsure how i should get the points from the database for the mentioned user. Any help or advice would be amazing, thanks!
(my database is SQLite)
const member = message.mentions.members.first() || message.member || message.guild.members.cache.get(args[0])
score = bot.getScore.get(message.author.id, message.guild.id);
if (!score) {
score = {
id: `${message.guild.id}-${message.author.id}`,
user: message.author.id,
guild: message.guild.id,
points: 0,
level: 1,
};
}
let curxp = score.points;
let curlvl = score.level;
let nxtLvlXp = curlvl * 300;
let difference = nxtLvlXp - curxp;
const embed = new Discord.RichEmbed()
.setTitle("XP / LEVEL")
.setDescription(member.user.tag)
.setThumbnail(member.user.displayAvatarURL)
.setColor(cyan)
.addField('**' + "Level" + '**', curlvl, true)
.addField('**' + "XP" + '**', curxp, true)
.setFooter(`${difference} XP til next level up`, bot.user.displayAvatarURL);
return message.channel.send({ embed });
You pretty much already have it
Instead of using message.author.id for the first argument why not just use the member variable which gives the final member?
Also you should have message.guild.members.cache.get(args[0]) before message.member, since message.member will always exist unless in a DM Channel.
const member = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.member;
score = bot.getScore.get(member.id, message.guild.id);
I have an index.cshtml that loads a grid of Agencies.
Clicking a custom button in the grid opens a window and loads a BillingRates grid in a partial view for the selected agency.
I read two parameters from the Agencies grid and want to use them for the datasource parameters of the BillingRates grid.
What is the best way to do that?
I have two hidden fields on the index.cshtml that store the two parameters I read from the Agencies grid. A javascript alert tells me the values are correct, but the hidden fields come up "undefined" though they are there and their values get posted -- I changed the fields to textboxes instead of hidden to prove this.
Here's my code:
hidden fields on index.cshtml (showing text here for testing)
<input type="text" value="" name="pidForBillingRates" />
<input type="text" value="" name="aidForBillingRates" />
custom button click event:
function ShowManageBillingRatesWindow_Click(e) {
e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
var pid = dataItem.Provider;
var aid = dataItem.AgencyId;
$("#pidForBillingRates").val(pid);
$("#aidForBillingRates").val(aid);
alert("pidForBillingRates = " + $("#pidForBillingRates"));
alert("pidForBillingRates.val() = " +
$("#pidForBillingRates").attr('value'));
alert("aidForBillingRates.val() = " +
$("#aidForBillingRates").attr('value'));
alert("pid = " + pid + " and aid = " + aid);
$('#manageBillingRatesWindow').load('#Url.Action("AgencyBillingRateView",
"AgencyBillingRate")' + "?providerId=" + pid + "&agencyId=" + aid);
var window = $("#manageBillingRatesWindow").data("kendoWindow");
window.center().open();
}
The first alert:
alert("pidForBillingRates = " + $("#pidForBillingRates"));
comes back with:
{object object}
so I know it finds the textbox.
The second alert:
alert("pidForBillingRates.val() = " +
$("#pidForBillingRates").attr('value'));
comes back "Cannot read value of undefined."
The third alert:
alert("aidForBillingRates.val() = " +
$("#aidForBillingRates").attr('value'));
comes back "Cannot read value of undefined."
The fourth alert"
alert("pid = " + pid + " and aid = " + aid);
comes back with the correct values for pid and aid.
I tried putting the hidden fields (textbox fields for testing) on the index.cshtml, and then on the BillingRates partial view but still get the same undefined messages.
So the grid does not load any data because it's not retrieving the two necessary parameters in the filter it uses.
How do I fix this?
I doubt that "it finds the textbox" pidForBillingRates. The hash sign tells jQuery to search for an element with the id "pidForBillingRates". What you want is to search for an element with an attribute name and the attribute value "pidForBillingRates". So $("input[name='pidForBillingRates']") should give you the correct element.
See https://api.jquery.com/category/selectors/ for all supported selectors in jQuery.
I have a temporary table where I let the user copy the record that needs to be edited. Once the edit is complete, I copy it back.
I am getting an error when I am trying to copy the original record to temporary table for editing. Here's the code I am using
console.log('copyOriginalToTemp ' + tempRecord.ID + ' options ' + JSON.stringify(options));
var myCreateDatasource = app.datasources.RadiosTemp.modes.create;
console.log('# of items in myCreateDatasource ' + myCreateDatasource.items.length);
var draft = myCreateDatasource.item;
draft.BatchId = options.BatchId ;
draft.County = tempRecord.County ;
... // lot of assignments
console.log('About to create item ');
myCreateDatasource.createItem(function(createdRecord) {
console.log('Creating the Item ' + createdRecord._key);
app.datasources.RadiosTemp.query.filters.BatchId._equals = options.BatchId;
.....
});
Error message tells me that newly created item cannot be selected but I have no idea why?. If I change the datasource to Manual Save, I get the same error with no key since it is in Manual save mode.
Currently, in the User Report view of Google Analytics, I get timestamps on each event, but it is only down to the minute, not the second. I can't find a setting in GA that changes that column.
My goal is to pass this timestamp through GTM, perhaps as "tag label", so that I can see it in GA.
How do I create a timestamp variable in GTM?
Create a custom javascript variable (i.e. a variable that contains a function, not a "javascript" variable that just reads a global variable), and give it a name, e.g. "timestamp".
Custom javascript variables are anonymous functions with a return value.
The current way to get a timestamp is Date.now(). This might not be supported by older browser (especially IE 8 and lower), so you might use new Date().getTime(); as an alternative.
The variable body would be as simple as:
function() {
return Date.now();
}
and you would use that in a tag by surrounding the variable name with double curly parenthesis, e.g. {{timestamp}}. Date.now() returns milliseconds ( elapsed since 1 January 1970 00:00:00 UTC), so you might want to divide by thousand.
Alternatively you could create a datetime variable that includes seconds and even milliseconds. I think this was originally by Simo Ahava:
function() {
// Get local time as ISO string with offset at the end
var now = new Date();
var tzo = -now.getTimezoneOffset();
var dif = tzo >= 0 ? '+' : '-';
var pad = function(num) {
var norm = Math.abs(Math.floor(num));
return (norm < 10 ? '0' : '') + norm;
};
return now.getFullYear()
+ '-' + pad(now.getMonth()+1)
+ '-' + pad(now.getDate())
+ 'T' + pad(now.getHours())
+ ':' + pad(now.getMinutes())
+ ':' + pad(now.getSeconds())
+ '.' + pad(now.getMilliseconds())
+ dif + pad(tzo / 60)
+ ':' + pad(tzo % 60);
}
which returns a formatted string like 2016-08-02T09:22:44.496+02:00.
The second it's not accesible via Google Analytics. The closest way to do this is via Google Big Query,but this last is only available for premium members.
Maybe you can add the timeStamp as CustomDimentions
function getdateGA(){
return Date();
}
ga('send', 'event', 'category', 'action', {
'dimention1': getdateGA()
});
The date format is not the best one, try to find the best for you modifing the getdateGA function
More resources about the date in
How to format a JavaScript date