• Jonathan Bernd 31
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
I'm looking for a client to find the limits of declarative editing with Communities templates. The goal is not to have vf templates. The template in question is Napili.
Here are two things we'd like to do:
1) Change the button colors for 'Reopen case' (currently green) and the Case summary header (currently blue) so that the colors are in line with the rest of the branding. I can't for the life of me figure out where the colors for the buttons are set. Been trying to look at css but it's not clear where it is or how to change it.
2) Change/increase tabs across the top. The client would like a case tab.

Are these things possible declaratively? That's the question. Any help would be greatly appreciated. Thanks
Hi
This is for a trailhead challenge.
The goal is to find today's day (name) and then update a string to say Today is "day".
We have to use aura:if

I can get it to work if I put in a default day, but I want my component to know the actual day. I don't know if there is anything I can do to pull in today() to my attribute.

I've got a javascript function (here) but cannot tether it properly to my component without having an event to activate the function (like button click or input field).  This is probably because I don't really know javascript or aura.  (Hence trailhead).

Help would be greatly appreciated.
Here's my javascript to get the day in case it's needed.
({

myDay :  function (component, event, helper)  {

var d = new Date();
var wday = new Array(7);
wday[0]=  "Sunday";
wday[1] = "Monday";
wday[2] = "Tuesday";
wday[3] = "Wednesday";
wday[4] = "Thursday";
wday[5] = "Friday";
wday[6] = "Saturday";

var n = wday[d.getDay()];

}

})

 
Newbie question.  I want to use Javascript to conditionally return values based on the incoming value from a Salesforce picklist field.
(I know I can make conditional fields in SF, but I want to figure out how to get a variable from what comes from SF so I can use it in javascript).

Here's the example without Salesforce fields that works fine:
<script>
var myfirst = 'This';
var mysecond = 'That';
var inpvariable = 'Banana';


if(inpvariable =='Coffee')
document.write(myfirst);
 else document.write(mysecond);
</script>
Here is what I want to do with an incoming picklist field
<div class = "mypage">
{!Opportunity.StageName}
</div>

<script>
var myfirst = 'This';
var mysecond = 'That';
var myother = 'Other';
var inpvariable = {!Opportunity.StageName}.value;


if(inpvariable =='Prospecting')
document.write(myfirst);
 else if (inpvariable =='Proposal/Price Quote')
document.write(second);
else
document.write(myother);
</script>
Help would be greatly appreciated.  Thanks in advance
 
Hi folks
Not great at javascript. Also newbie with Salesforce1 mobile. Here's my problem. Trying to create an onClick button that passes the contents of an input field (entered on a custom visualforce SF1 page) as the 'mailto' email address. I want to add a set subject line and body and then send this email on the click of a button on my custom mobile vf page.

I have created a link in js which does everything EXCEPT bring in the email address from the input field. I may be using the wrong syntax for a random input field but here's what I'm using <input type="text" id="email"/>.  I want to get this into a variable that I can use for the 'to' address.


E.g.  
var email (here's where I need my incoming email from the input field)
var subject = ('My permanent subject line');
var body = ('My permanent body contents');

document.write('<a href="mailto:' + email + '?subject=' +subject+ '&body=' +body+ '">' + 'Click here to send email as well' + '<'+'/a>');

As you can see I've made this a link in the interim that 'works' for what it does, but does not answer my missing enterable email problem.

What I really want to do then is have an onClick button that will activate the above instead of a link.

If you can help me with best practices for this it will go a long way as I can use the principles to apply to my further investigation and development.

Thanks
Newbie question.  I want to use Javascript to conditionally return values based on the incoming value from a Salesforce picklist field.
(I know I can make conditional fields in SF, but I want to figure out how to get a variable from what comes from SF so I can use it in javascript).

Here's the example without Salesforce fields that works fine:
<script>
var myfirst = 'This';
var mysecond = 'That';
var inpvariable = 'Banana';


if(inpvariable =='Coffee')
document.write(myfirst);
 else document.write(mysecond);
</script>
Here is what I want to do with an incoming picklist field
<div class = "mypage">
{!Opportunity.StageName}
</div>

<script>
var myfirst = 'This';
var mysecond = 'That';
var myother = 'Other';
var inpvariable = {!Opportunity.StageName}.value;


if(inpvariable =='Prospecting')
document.write(myfirst);
 else if (inpvariable =='Proposal/Price Quote')
document.write(second);
else
document.write(myother);
</script>
Help would be greatly appreciated.  Thanks in advance
 
Hi folks
Not great at javascript. Also newbie with Salesforce1 mobile. Here's my problem. Trying to create an onClick button that passes the contents of an input field (entered on a custom visualforce SF1 page) as the 'mailto' email address. I want to add a set subject line and body and then send this email on the click of a button on my custom mobile vf page.

I have created a link in js which does everything EXCEPT bring in the email address from the input field. I may be using the wrong syntax for a random input field but here's what I'm using <input type="text" id="email"/>.  I want to get this into a variable that I can use for the 'to' address.


E.g.  
var email (here's where I need my incoming email from the input field)
var subject = ('My permanent subject line');
var body = ('My permanent body contents');

document.write('<a href="mailto:' + email + '?subject=' +subject+ '&body=' +body+ '">' + 'Click here to send email as well' + '<'+'/a>');

As you can see I've made this a link in the interim that 'works' for what it does, but does not answer my missing enterable email problem.

What I really want to do then is have an onClick button that will activate the above instead of a link.

If you can help me with best practices for this it will go a long way as I can use the principles to apply to my further investigation and development.

Thanks