• AK_Smith
  • NEWBIE
  • 75 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 30
    Questions
  • 49
    Replies
Hello!
We need to send an outlook appointment when a record is created using the record fields as values for text header and dates of the appointment

Is there any solution or existing app for that? 
Hello!
I have 2 objects PA__c and journal__c

I need to create a new record on object stat__c and write results to the fields.

stat__c .Field1__c. If there any journal__c created within 30 min after first PA__c (datetime field Start_date__c) than Field1__c = yes
stat__c .Field2__c. If there any journal__c created within 8 hours  after last PA__c (datetime field Start_date__c) than Field2__c = yes

The trigger should be schedulable 
Hi! 
Is there any way to automatically post to chatter message on the weekly basis with the list of users who have birthdays this week (name and date)? 
Hello! 
I need to show on the VF page (table) results of the 3 SOQL requests:

I have 2 objects: Users and related SyncLog__c

I need to see on the table
First column: Users list
Second column: Is there records created before 10 AM YES/NO
Third column: Is there records created after 6 PM YES/NO



 
Hi!
Today I found the Trailbed Early Adopter badge on my page.
How did I get it and цhat other types exist?
Hello!
I need to create a button that will update checkbox IsTarget__c on Contact if OwnerId = User.Id
Hello! 
Please help me with my VF page.
i need to update <p> from the CTPHARMA__Activity__c.SF1_Status__c (text formula) until y < 6 && z && u != "Win32" returns true
 
<apex:page standardController="CTPHARMA__Activity__c" id="page" docType="html-5.0">
<style>
.good{
text-align:center;
background-color: MediumSeaGreen;
font-weight: bold;
color: white;
}
.bad{
text-align:center;
background-color: Tomato;
font-weight: bold;
color: white;
}

.ugly{
text-align:center;
background-color: LightGray;
}


</style>
  
    <apex:form styleClass="{!if(CTPHARMA__Activity__c.SF1_Status__c == 'Подтвержден территориально','good',if(CTPHARMA__Activity__c.SF1_Status__c == 'Не подтвержден территориально','bad','ugly'))} ">

<p id="text"></p>

    </apex:form>
    
    
    <script>
    myFunction();
    function myFunction(){
    var x = {!CTPHARMA__Activity__c.SF1_Status__c};
    var y = {!CTPHARMA__Activity__c.SF1_Attempts__c};
    var z = {!CTPHARMA__Activity__c.SF1_Request_geo__c};
    var u = window.navigator.platform;
    
    do{
    
    document.getElementById("text").innerHTML = x;
     } 
     while (y < 6 && z && u != "Win32")
     }
     
    </script>
 
</apex:page>

 
Hello i need only to reload frame with VF page.
I use <apex:commandButton value="Check" id="checkBtn" oncomplete="window.location.reload( true );"/>, but it reloads parrent page inside the visual forece page, how to fix it?
How to reload/rerender VF Page frame by if condition. 
If CTPHARMA__Activity__c.SF1_Status__c contains ‘in progress ’ than refresh page else do nothing 
 
​<apex:page standardController="CTPHARMA__Activity__c" id="page" docType="html-5.0">
<style>
.good{
text-align:center;
background-color: MediumSeaGreen;
font-weight: bold;
color: white;
}
.bad{
text-align:center;
background-color: Tomato;
font-weight: bold;
color: white;
}

.ugly{
text-align:center;
background-color: LightGray;
}


</style>
  
    <apex:form styleClass="{!if(CTPHARMA__Activity__c.SF1_Status__c == 'Подтвержден территориально','good',if(CTPHARMA__Activity__c.SF1_Status__c == 'Не подтвержден территориально','bad','ugly'))} ">
<apex:outputText value="{!CTPHARMA__Activity__c.SF1_Status__c}" />
    </apex:form>
</apex:page>



 
Hello!
Is it possible to align text in the middle of VF page frame in SF1?  If my frame is to narrow  i get result like on the screen (green stripe)

Is it possible to align it on top of the frame?
User-added image
 
<apex:page standardController="CTPHARMA__Activity__c" id="page" docType="html-5.0">
<style>
.good{
text-align:center;
background-color: MediumSeaGreen;
font-weight: bold;
color: white;
}
.bad{
text-align:center;
background-color: Tomato;
font-weight: bold;
color: white;
}

.ugly{
text-align:center;
background-color: LightGray;
}


</style>
  
    <apex:form styleClass="{!if(CTPHARMA__Activity__c.SF1_Status__c == 'Подтвержден территориально','good',if(CTPHARMA__Activity__c.SF1_Status__c == 'Не подтвержден территориально','bad','ugly'))} ">
<apex:outputText value="{!CTPHARMA__Activity__c.SF1_Status__c}" />
    </apex:form>
</apex:page>




 
Hello! Please hellp me to fix my code to get user agent 
 
<apex:page standardController="CTPHARMA__Activity__c" id="page">

<script>
agent()
function agent() {
    var u = window.navigator.userAgent;
       document.getElementById('page:form:A').value  = 1;
       }
</script>




<apex:form id="form" >

<apex:inputField id="A"  value="{!CTPHARMA__Activity__c.SF1_UA__c}" /> 

</apex:form>



</apex:page>

 
Hello!
Is it possible to show force:showToast alert on VF page with only javascript?
Hello!
Is it possibe to send toast message in SF1 from visualforce page using Script? 
Hello!
Is it possible to use standart alerts like on screen below from the Visualforce page in SF1? 

User-added image
Hello! I trying to add +1 to field with the code below. But did not succeed
 
<script>
       plus()
        var a = {!Activity__c.SF1_Attempts__c};
        function plus(){
        document.getElementById('page:form:Attempts').value = a + 1;
        }

</script>


Attempts : <apex:inputField id="Attempts" value="{!Activity__c.SF1_Attempts__c}" />

 
Hello! how to run skript only if checkbox Project__c.check__c is checked
 
<script>
        var int=self.setInterval(function(){callActionFunction()},200);
        function callActionFunction(){
            ActionFunctionName();
        }

</script>

 
Hello! I have a problem with the visualforce page below. I use it in the Salesforce1. After the action="{!save}" VF page closes but the parent page stays the same with the olв values. How to re render/reload it automatically?
 
<apex:page standardController="Project__c" id="page" docType="html-5.0">
<script>
geoFindMe()
function geoFindMe() {
  var output = document.getElementById("out");

  if (!navigator.geolocation){
    output.innerHTML = "<p>Geolocation is not supported by your browser</p>";
    return;
  }

  function success(position) {
    var latitude  = position.coords.latitude;
    var longitude = position.coords.longitude;

    document.getElementById('page:form:lati').value = latitude.toString().replace(".",",")  ;
    document.getElementById('page:form:long').value = longitude.toString().replace(".",",")  ; 
    document.getElementById('page:form:SF1').checked = true;

   
  };

  function error() {
    output.innerHTML = "Unable to retrieve your location";
  };

  navigator.geolocation.getCurrentPosition(success, error);
}
</script>

<script>
function reload(){
sforce.one.back(true);
}
</script>

   <script>
        var int=self.setTimeout(function(){callActionFunction()},200);
        function callActionFunction(){
            ActionFunctionName();
        }

</script>

<apex:form id="form">

  <div style="display:none;"></div>
latitude :<apex:inputField id="lati"  value="{!Project__c.l__c}" /> <br></br>
longitude :<apex:inputField id="long" value="{!Project__c.ll__c}" />
<apex:inputField id="SF1" value="{!Project__c.SF1__c}" />

        <apex:actionFunction action="{!save}" name="ActionFunctionName"/>
                     
                     
                     
</apex:form>

</apex:page>

 
Hello! Please help me with the code below.
I created an action button that opens the VF page on SF1 record
After i hit SAVE button the  VF page closes but values in Project__c.l__c/Project__c.ll__c stays the same (old)
I have to pull down the page to see the results. 
how to automatically update the record window after clicking on the save button?
 
<apex:page standardController="Project__c" id="page" docType="html-5.0">
<script>
geoFindMe()
function geoFindMe() {
  var output = document.getElementById("out");

  if (!navigator.geolocation){
    output.innerHTML = "<p>Geolocation is not supported by your browser</p>";
    return;
  }

  function success(position) {
    var latitude  = position.coords.latitude;
    var longitude = position.coords.longitude;

    document.getElementById('page:form:lati').value = latitude.toString().replace(".",",")  ;
    document.getElementById('page:form:long').value = longitude.toString().replace(".",",")  ; 
    document.getElementById('page:form:SF1').checked = true;

   
  };

  function error() {
    output.innerHTML = "Unable to retrieve your location";
  };

  navigator.geolocation.getCurrentPosition(success, error);
}
</script>


<apex:form id="form">

  <div style="display:none;"></div>
latitude :<apex:inputField id="lati"  value="{!Project__c.l__c}" /> <br></br>
longitude :<apex:inputField id="long" value="{!Project__c.ll__c}" />
<apex:inputField id="SF1" value="{!Project__c.SF1__c}" />


<apex:commandButton action="{!save}"  value="Save"/>

                     
                     
                     
</apex:form>

</apex:page>

 
Hello!
im using action="{!save}" on my VF page in SF1. But when it close the window it does not refresh the page

how to fix it?
Hello! is there any option to use apex:actionPoller  without interval?
I need to execute action immediately

My code is
<apex:actionPoller action="{!save}" interval="5" oncomplete="reload()"/>
Hello!
We need to send an outlook appointment when a record is created using the record fields as values for text header and dates of the appointment

Is there any solution or existing app for that? 
Hi! 
Is there any way to automatically post to chatter message on the weekly basis with the list of users who have birthdays this week (name and date)? 
Hi,
I am getting below error while checking 4th step of the "App Customization Specialist" superbadge .

Error -Challenge Not yet complete... here's what's wrong: The 'My Top Volunteer Organizations' component is using the incorrect source report.

I checked my source report in the dashboard and it seems to be I am using correct source report named "My Top Volunteer Organizations" but still I am getting this error.I also tried to check the challenge in a different browser but getting the same error.
User-added image

Can anyone help me to solve this issue?

Thanks,
Swapnil.
 
Hello!
I need to create a button that will update checkbox IsTarget__c on Contact if OwnerId = User.Id
Hello! 
Please help me with my VF page.
i need to update <p> from the CTPHARMA__Activity__c.SF1_Status__c (text formula) until y < 6 && z && u != "Win32" returns true
 
<apex:page standardController="CTPHARMA__Activity__c" id="page" docType="html-5.0">
<style>
.good{
text-align:center;
background-color: MediumSeaGreen;
font-weight: bold;
color: white;
}
.bad{
text-align:center;
background-color: Tomato;
font-weight: bold;
color: white;
}

.ugly{
text-align:center;
background-color: LightGray;
}


</style>
  
    <apex:form styleClass="{!if(CTPHARMA__Activity__c.SF1_Status__c == 'Подтвержден территориально','good',if(CTPHARMA__Activity__c.SF1_Status__c == 'Не подтвержден территориально','bad','ugly'))} ">

<p id="text"></p>

    </apex:form>
    
    
    <script>
    myFunction();
    function myFunction(){
    var x = {!CTPHARMA__Activity__c.SF1_Status__c};
    var y = {!CTPHARMA__Activity__c.SF1_Attempts__c};
    var z = {!CTPHARMA__Activity__c.SF1_Request_geo__c};
    var u = window.navigator.platform;
    
    do{
    
    document.getElementById("text").innerHTML = x;
     } 
     while (y < 6 && z && u != "Win32")
     }
     
    </script>
 
</apex:page>

 
Hello! Please hellp me to fix my code to get user agent 
 
<apex:page standardController="CTPHARMA__Activity__c" id="page">

<script>
agent()
function agent() {
    var u = window.navigator.userAgent;
       document.getElementById('page:form:A').value  = 1;
       }
</script>




<apex:form id="form" >

<apex:inputField id="A"  value="{!CTPHARMA__Activity__c.SF1_UA__c}" /> 

</apex:form>



</apex:page>

 
Hello!
Is it possibe to send toast message in SF1 from visualforce page using Script? 
Hi,
I finally solved LES Challenge 8 after 10+ hours of headache. I had to create a lot of new columns and add data to the rows in my .CSV-file. Some files contained 130 rows and some only 3 rows. This is a rather small number of rows in guessing and therefore I'm wondering if there's an easier way to solve it when, lets say, you have files with 20 000+ rows. I'm looking for a better way to solve it than how I did it, a best practice of some kind. 
How did you guys do it? Is there a best practice?

I'm using the Dataloader.io when importing: 
  1. Downloaded the Superbadge-Lightning-Import.xlsx and split it up/converted into Explorers.csv , Adventures.csv and OpportunitiesWAdventures.csv 
  2. Insert Explorers from Explorers.csv. 
    1. Since Opportunities contains Adventure Package which contains a lookup to Explorer and the Adventure I figured the easiest would be to start inserting the Explorers.csv. Before inserting the Explorer.csv I had to split the Full Name column into First name and Last name to match the Explorer-object's Firstname and Lastname column. 
  3. Insert Adventures from Adventures.csv
    1. Before importing Adventure.csv I removed the Explorer column since it was empty and I also cleaned up the data in the Description column cause it contained commas and was interfering.
  4. Insert Price Book Entry from Adventures.csv
    1. The Adventures has to be in the Price Book to be able to be added to an Adventure Package. Therefore I added a column in the called PricebookID and added the Pricebook ID of the Standard Price Book to the rows. 
      1. Mapped field:
        1. Adventure Name - Adventure (Lookup via Adventure Name)
        2. List Price - List Price
        3. Active (Adventure) - Active
        4. Pricebookid - Price Book ID
  5. Insert Opportunities from OpportunitiesWAdventures.csv. 
    1. Mapped fields:
      1. Close Date - CloseDate, 
      2. Opportunity Name - Name
      3. Probability (%) - Probability
      4. Quantity - TotalOpportunityQuantity
      5. Stage - StageName
  6. Insert Opportunity Contact Role from OpportunitiesWAdventures.csv
    1. Mapped Fields
      1. Opportunity Name to Opportunity ID(Lookup via  Name) 
      2. Explorer to Explorer (Lookup via Full Name)
  7. Insert Adventure Package from OpportunitiesWAdventures.csv
    1. Added new column for Adventure Name in OpportunitiesWAdventures.csv and added the Adventure name (contained as a part in the Opportunity Name column) to all the rows. 
      1. Mapped Fields: 
        1. Opportunity Name - Opportunity ID(Lookup via Name)
        2. Adventure Name - Price Book Entry ID (Lookup via Adventure Name)
        3. Explorer - Explorer (Lookup via Full Name)
Please leave a comment on how you solved it, thanks! :)