-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
5Questions
-
12Replies
Adding a lightning component created via App Builder to VF Page ?
My question is , is there a way to a component created via Lightning App Builder to a VF Page ?
Thank you all
-
- Ronen Slifkin
- March 16, 2017
- Like
- 0
- Continue reading or reply
Accessing Apex controller vars inside a JS file in Static Resouce
Hello all,
I have a problem in a vf page that's reside in a Site.
in the page I'm adding a static resource
<apex:includeScript value="{!URLFOR($Resource.SiteEssentials)}" />
in this js file I want to access controller vars like this
var a = {!randomNumber};
I'm getting an error when loading the page - Uncaught SyntaxError: Unexpected token ! in the js file
if I put the same line in the vf page itself , all is ok.
I hope someone can help me figure if this can be achived.
TIA
Ronen
-
- Ronen Slifkin
- March 08, 2017
- Like
- 0
- Continue reading or reply
Visualforce Page with dynamic standardcontroller
Hello all
lets take this for example for a vf page
apex:page standardController="Contact" extensions="vf_ContactsUpdateFieldSetsController" showHeader="false" sidebar="false"
I want to be able to set the standartController with a changing value so this page would be dynamic and serve various objects.... and not just Contact
I also need to be able to use : contact = (Contact)controller.getRecord(); ----------> in a dynamic way so I can still can get the values from the screen
is there a way to achive that ? maybe by using only the extensions ? but how can I get the values of the fields in the screen ?
Any help or direction would be appriciated
background behind that need:
I would like to display a fieldset on that page , but the fieldset can be once from Contact , or any other Object.
TIA
-
- Ronen Slifkin
- August 31, 2014
- Like
- 0
- Continue reading or reply
Trigget on task , can't update WhoID
In the debug maptoContact.get(t.WhatId) returns the Id of the wanted contact..
what is wrong here ?
trigger Task_BeforeInsertUpdateDelete on Task (before delete, before insert, before update)
{
trigger Task_BeforeInsertUpdateDelete on Task (before delete, before insert, before update)
{
for(Task t : Trigger.new)
{
t.WhoId = maptoContact.get(t.WhatId);
}
}
-
- Ronen Slifkin
- July 25, 2014
- Like
- 0
- Continue reading or reply
sending SingleEmailMessage with setSaveAsActivity(true)
We have a need to send an email to an external email address (which we did) but we also wants salesforce to add a task for this action.
We managed to do this from a send an email button in the following way (you can see in the image)
The problem is that we can't reproduce this behavior with apex code.
we tried this with the code below : The Email sent but Task not created
[ Please be advised - we do not want to use message.setTargetObjectId() becuase we don't want to send an email to the contact ]
List<string> toList = new List<string>();
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
toList.add('any@external.email');
message.setUseSignature(false);
message.setSaveAsActivity(true);
message.setSubject('Any subject);
message.setHtmlBody('any Body');
message.setWhatId('00111000007dqTk'); // THIS IS AN ID OF THE SIMPSON'S FAMILY
message.setToAddresses(toList);
Messaging.sendEmail(message);
-
- Ronen Slifkin
- July 02, 2014
- Like
- 0
- Continue reading or reply
Accessing Apex controller vars inside a JS file in Static Resouce
Hello all,
I have a problem in a vf page that's reside in a Site.
in the page I'm adding a static resource
<apex:includeScript value="{!URLFOR($Resource.SiteEssentials)}" />
in this js file I want to access controller vars like this
var a = {!randomNumber};
I'm getting an error when loading the page - Uncaught SyntaxError: Unexpected token ! in the js file
if I put the same line in the vf page itself , all is ok.
I hope someone can help me figure if this can be achived.
TIA
Ronen
- Ronen Slifkin
- March 08, 2017
- Like
- 0
- Continue reading or reply
Visualforce Page with dynamic standardcontroller
Hello all
lets take this for example for a vf page
apex:page standardController="Contact" extensions="vf_ContactsUpdateFieldSetsController" showHeader="false" sidebar="false"
I want to be able to set the standartController with a changing value so this page would be dynamic and serve various objects.... and not just Contact
I also need to be able to use : contact = (Contact)controller.getRecord(); ----------> in a dynamic way so I can still can get the values from the screen
is there a way to achive that ? maybe by using only the extensions ? but how can I get the values of the fields in the screen ?
Any help or direction would be appriciated
background behind that need:
I would like to display a fieldset on that page , but the fieldset can be once from Contact , or any other Object.
TIA
- Ronen Slifkin
- August 31, 2014
- Like
- 0
- Continue reading or reply
Trigget on task , can't update WhoID
In the debug maptoContact.get(t.WhatId) returns the Id of the wanted contact..
what is wrong here ?
trigger Task_BeforeInsertUpdateDelete on Task (before delete, before insert, before update)
{
trigger Task_BeforeInsertUpdateDelete on Task (before delete, before insert, before update)
{
for(Task t : Trigger.new)
{
t.WhoId = maptoContact.get(t.WhatId);
}
}
- Ronen Slifkin
- July 25, 2014
- Like
- 0
- Continue reading or reply
sending SingleEmailMessage with setSaveAsActivity(true)
We have a need to send an email to an external email address (which we did) but we also wants salesforce to add a task for this action.
We managed to do this from a send an email button in the following way (you can see in the image)
The problem is that we can't reproduce this behavior with apex code.
we tried this with the code below : The Email sent but Task not created
[ Please be advised - we do not want to use message.setTargetObjectId() becuase we don't want to send an email to the contact ]
List<string> toList = new List<string>();
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
toList.add('any@external.email');
message.setUseSignature(false);
message.setSaveAsActivity(true);
message.setSubject('Any subject);
message.setHtmlBody('any Body');
message.setWhatId('00111000007dqTk'); // THIS IS AN ID OF THE SIMPSON'S FAMILY
message.setToAddresses(toList);
Messaging.sendEmail(message);
- Ronen Slifkin
- July 02, 2014
- Like
- 0
- Continue reading or reply