• bujji
  • NEWBIE
  • 34 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 136
    Questions
  • 178
    Replies

Is it possible to use schedule process  in DATALOADER COMMANDLINE?

  • June 03, 2013
  • Like
  • 0
Hi Guys,

I am new bee to use angularjs in salesforce. Below is my code which is working fine when i put the below snippet in script tag in the same page.
var app = angular.module('myApp', []);
 app.controller('myctrl', function ($scope) {   
     <!--$scope.contacts = {!contacts} -->
     $scope.fname = 'Test1';
     $scope.lname = 'Test2';
 });

But when i put the above code in app.js static resource and refrenced <apex:includeScript value="{!$Resource.app}"/> it is throwing the error.
angular is not defined.

Could anybody tell me what is the wrong i am doing.

Thanks,
Bujji.
  • March 16, 2017
  • Like
  • 0
Hi,

I want to create an account when the button clicked in the lightnining component. I am able to do it successfully but the real problem i am facing is i have a field with four radio buttons, i have to save the user select radio button label into this field. How to acheive this. Please see my code. Thanks.

<form class="slds-form--stacked">
              
              <div class="slds-form-element slds-is-required">
                  <div class="slds-form-element__control">
                      <ui:inputText aura:id="accname" label="Account Name"
                                    class="slds-input"
                                    labelClass="slds-form-element__label"
                                    value="{!v.newAccount.Name}"
                                    required="true"/>
                  </div>
              </div>
                         
               <b>Radio Buttons - Group</b>
               <ui:inputRadio aura:id="r0" name="others" label="Test1" change="{!c.onGroup}" />
               <ui:inputRadio aura:id="r1" name="others" label="Test2" change="{!c.onGroup}" value="{!v.newAccount.Interest}"/>
               <ui:inputRadio aura:id="r2" name="others" label="Test3" change="{!c.onGroup}" />
               <ui:inputRadio aura:id="r3" name="others" label="Test4" change="{!c.onGroup}" />
               <b>Selected Items:</b>
               <p><ui:outputText class="result" aura:id="radioGroupResult" value="" /></p>
            
 
              <div class="slds-form-element">
                  <ui:button label="Save Account"
                             class="slds-button slds-button--brand"
                             press="{!c.clickAccountCreate}"/>
              </div>
          </form>
---------------
    clickAccountCreate: function(component, event, helper) {

            // Create the new Account
            var newAccount = component.get("v.newAccount");
            console.log(component.find('others'));
            //newAccount.Website = event.source.get("v.label");
            console.log("Create Account: " + JSON.stringify(newAccount));
            helper.createAccount(component, newAccount);
    },
  • January 19, 2017
  • Like
  • 0
Hi Guys,

I have to update third party using HTTP PATCH method, but in apex class HTTP Request is not allowing me to send a request using req.setMethos('PATCH'). Is there any way that i can send PATCH request to third party system from apex class. Please give me some ideas.

Thanks.
  • April 07, 2016
  • Like
  • 0
Hi Guys,

Is there any way that i can run cURL commands in apex call to connect third party systems. Because i am getting some SSL certificate error when i try to connect the third party system but from cURL i am able to connect. Please give me some idea URGENT.

Thanks!
  • April 06, 2016
  • Like
  • 1
Hi Guys,

I have scenario like, i need to connect SQL Server with out using any SSRS,SSIS. I thought external data source will be helpful.
Please suggest a way to connect to SQL Server from Salesforce.....

Thanks,
Bujji.
  • October 23, 2014
  • Like
  • 0
Hi,

I have two list of ids, i need to compare two list of ids and put unique id in a Third List. How to do it.

suppose
List<ID> ids1 = new List<ID>('003aaa','003bbb','003ccc');
List<ID> ids2 = new List<ID>('003aaa','003bbb');
List<ID> ids3 = new List<ID>();

I want unique value in the third list :

ids3 = '003ccc';

I have written the code like the below, but it is not working.

for(Id id1:contactList){
      if(id1.contains(campaignInsertIdlist))
      {     }
      else
     {
                 insertIds.add(id1);
      }
}

I am getting an error saying incorrect signature or contains method is not existed.
Give me suggestion, how to achieve it.

Thanks,
Bujji
  • September 18, 2014
  • Like
  • 0
Hi,

I have a account list (aList), i need contact ids list from the account list. How to do it. 
Here i am getting 10 accounts, suppose if each account having 10 contacts than i want all the 100 contact ids in one list.
How to write the loop for this.Below is the code where i am getting all the 10 accounts and 100 contacts in one list.


String baseQuery = 'Select Id,Name,(select Id,Name from Contacts Limit 10) from Account ';
       
String finalQuery = baseQuery +' where Id IN (select AccountId from Contact) Order By Name limit 10';

List<Account> aList = Database.Query(finalQuery);

Please give me suggestions how to get contacts ids list.

Thanks,
Bujji

  • September 17, 2014
  • Like
  • 0
Hi Guys,

I have a scenario like, when the user click on the custom link in standard layout it should show some SQL Server data in visualforce page.

Thanks,
Bujji
  • September 03, 2014
  • Like
  • 0
Hi Guys,

I have a registered a new domain under the salesforce Domain Management in developer edition. I am got the email from Salesforce also with the subject  'DNS Propagation Successful'. When i am clicking the testing link i am getting the following error "Server is not found or The webpage is not available".

What might be the issue, will it take anytime to activate the domain? Please let me know how to get the new domain work ?

Thanks,
Bujji
  • August 19, 2014
  • Like
  • 0
Hi Guys,

I have list of Contacts, i need to add accountId to these contacts and then insert. How we can do it.

I tried the below way but getting some error.

Account account = new Account([select Id from Account Limit 1]);

List<Contact> cons = new List<Contacts>();

for(List<Contact> c:cons){
      c.add(account.Id);
  }
  insert cons;

Thanks,
Bujji
  • August 14, 2014
  • Like
  • 0
Hi Guys,

I have a class in which i am using StandaraSetController to display the data with paginations. How to write the test class for the below method.


ApexPages.StandardSetController con = new ApexPages.StandardSetController(Database.getQueryLocator([select Id,Name From Account limit 1000]));

public List<Account> displayAccts
            {
                get
                {
                    if(con != null)
                        return (List<Account>)con.getRecords();
                    else
                        return null ;
                }
                set;
            }

Thanks,
Bujji
  • August 08, 2014
  • Like
  • 0
Hi Guys,

I am displaying data using StandardSetController and pagination, but when i want to export the data, it displaying only current page data but i want all data to be excel.How to achieve it.

Below is the code i am using to display to data.

public ApexPages.StandardSetController contoller{get; set;}

controller = new ApexPages.StandardSetController(Database.getQueryLocator(finalQuery));
               
 controller.setPageSize(200);

           public Boolean hasNext
            {
               get
               {
                     return controller.getHasNext();
               }
              set;
            }  
        
            public Boolean hasPrevious
            {
               get
               {
                   return controller.getHasPrevious();
               }
               set;
            }
Suggest me any idea how to achieve it.

Thanks,
Bujji

  • August 07, 2014
  • Like
  • 0
Hi Guys,

I am trying to show the user lookup in VF page. Unfortunately i am not able to as it showing any lookup icon. Below is my controller code and vf code.
How to show Lookup Icon, so that user can select the user.

* All fields are showing lookup except the Id

public User usr {get;set;}

<apex:outputLabel >User Lookup: </apex:outputLabel>
<apex:inputField value="{!usr.Id}"/>

Thanks,
Bujji
  • July 21, 2014
  • Like
  • 0
Hi Guys,

I am having a problem with accessing PersonContactId, if i am writing a SOQL query it is returning PersonContactId value. But if i am trying to use when creating a button it is throwing error like "PersonContactId" is not there.

I am using for the below conditions.

Behaviour: Excute Javascript
Content:     Onlick Javascript

in the body i am using like alert({!Account.PersonContactId});

why this strange behaviour, any suggestions are appreciated.

Thanks,
Bujji
  • April 25, 2014
  • Like
  • 0
Hi Guys,

I want to redirec to a url basing on the IF codntion on clicking on the standard page. For this i am creating a custom button and i am exectuing javascript.

i.e., using this condtion {!IF(logical_test, value_if_true, value_if_false)}  ..how to redirec to a url

Thanks,
Bujji
  • April 11, 2014
  • Like
  • 0

Hi Guys,

 

Is it possible to find the number of users who are using  vf page currently. Imagine like i have vf page called MyPage and i want exactly how many users are using the page "MyPage" and i want that count to be stored in a custome field.

I am able to bring the ip address of user who is using the page and able to save in the custome field also.

Whether it is useful or not, i am not sure.

 

Please suggest me how can i achieve this.

 

Thanks,

Bujji

  • November 14, 2013
  • Like
  • 0

Hi Guys,

 

I need a query to bring all the tasks of Account and tasks of Opportunities which related to the Account.

 

I have written a query which is bringing all tasks of Opprotunities of related Account, see the below query

List<Task> taskList = [select Id,OwnerId,whoId,whatId,Subject,ActivityDate,Priority,Status From Task
                       where   whatid IN (select Id From Opportunity where Account.Id ='0019000000DOsVO')
                         ];

along with this i need the task of Account also. How to do it.
give me some suggestion. Urgent please.

 

Thanks,

Bujji

  • October 31, 2013
  • Like
  • 0

Hi Guys,

 

I have a piece of code in php to implement Captcha, but exactly i don't know how to implement this one visualforce and apex.. If anybody knows how to do it please explain how to implement.

 

Below is the code of php..

 

 <?php session_start(); ?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Author" content="Jose Rodriguez" />
<title>Captcha test</title>
<style type="text/css">
body { font-family: sans-serif; font-size: 0.8em; padding: 20px; }
#result { border: 1px solid green; width: 300px; margin: 0 0 35px 0; padding: 10px 20px; font-weight: bold; }
#change-image { font-size: 0.8em; }
</style>
</head>
<body onload="document.getElementById('captcha-form').focus()">

< ?php

/** Validate captcha */
if (!empty($_REQUEST['captcha'])) {
    if (empty($_SESSION['captcha']) || trim(strtolower($_REQUEST['captcha'])) != $_SESSION['captcha']) {
        $captcha_message = "Invalid captcha";
        $style = "background-color: #FF606C";
    } else {
        $captcha_message = "Valid captcha";
        $style = "background-color: #CCFF99";
    }

    $request_captcha = htmlspecialchars($_REQUEST['captcha']);

    echo <<<HTML
        <div id="result" style="$style">
        <h2>$captcha_message</h2>
        <table>
        <tr>
            <td>Session CAPTCHA:</td>
            <td>{$_SESSION['captcha']}</td>
        </tr>
        <tr>
            <td>Form CAPTCHA:</td>
            <td>$request_captcha</td>
        </tr>
        </table>
        </div>
HTML;
    unset($_SESSION['captcha']);
}

?>

<p><strong>Write the following word:</strong></p>

<form method="GET">
<img src="captcha.php" id="captcha" /><br/>

<!-- CHANGE TEXT LINK -->
<a href="#" onclick=" document.getElementById('captcha').src='captcha.php?'+Math.random(); document.getElementById('captcha-form').focus();"
    id="change-image">Not readable? Change text.</a><br/><br/>

<input type="text" name="captcha" id="captcha-form" autocomplete="off" /><br/>
<input type="submit" />

</form>

</body>
</html>

 

Thanks,

Bujji

  • October 21, 2013
  • Like
  • 0

Hi,

 

Is anybody implemented captcha apart from Google Re-Captcha. If so please suggest me some nice Captcha.

I have done recaptcha.. but i have some alignment problem..

 

Thanks,

Bujji

  • October 15, 2013
  • Like
  • 0

Hi,

 

I am creating a task from the vf page, is it possible to re-order the list in 'Related To' field. Currently 'Account' is the default value. I want Opportunity as the default/first value in the list.

 

how to do it.

 

i tried Task mytask = new Task(what = 'Opportunity');   but  i am getting error saying what is not writable field.

 

Thanks,

Bujji

  • October 07, 2013
  • Like
  • 0
Hi Guys,

Is there any way that i can run cURL commands in apex call to connect third party systems. Because i am getting some SSL certificate error when i try to connect the third party system but from cURL i am able to connect. Please give me some idea URGENT.

Thanks!
  • April 06, 2016
  • Like
  • 1
Hi Guys,

I am new bee to use angularjs in salesforce. Below is my code which is working fine when i put the below snippet in script tag in the same page.
var app = angular.module('myApp', []);
 app.controller('myctrl', function ($scope) {   
     <!--$scope.contacts = {!contacts} -->
     $scope.fname = 'Test1';
     $scope.lname = 'Test2';
 });

But when i put the above code in app.js static resource and refrenced <apex:includeScript value="{!$Resource.app}"/> it is throwing the error.
angular is not defined.

Could anybody tell me what is the wrong i am doing.

Thanks,
Bujji.
  • March 16, 2017
  • Like
  • 0
Hi Guys,

Is there any way that i can run cURL commands in apex call to connect third party systems. Because i am getting some SSL certificate error when i try to connect the third party system but from cURL i am able to connect. Please give me some idea URGENT.

Thanks!
  • April 06, 2016
  • Like
  • 1
Hi,

I have a account list (aList), i need contact ids list from the account list. How to do it. 
Here i am getting 10 accounts, suppose if each account having 10 contacts than i want all the 100 contact ids in one list.
How to write the loop for this.Below is the code where i am getting all the 10 accounts and 100 contacts in one list.


String baseQuery = 'Select Id,Name,(select Id,Name from Contacts Limit 10) from Account ';
       
String finalQuery = baseQuery +' where Id IN (select AccountId from Contact) Order By Name limit 10';

List<Account> aList = Database.Query(finalQuery);

Please give me suggestions how to get contacts ids list.

Thanks,
Bujji

  • September 17, 2014
  • Like
  • 0
Hi Guys,

I am displaying data using StandardSetController and pagination, but when i want to export the data, it displaying only current page data but i want all data to be excel.How to achieve it.

Below is the code i am using to display to data.

public ApexPages.StandardSetController contoller{get; set;}

controller = new ApexPages.StandardSetController(Database.getQueryLocator(finalQuery));
               
 controller.setPageSize(200);

           public Boolean hasNext
            {
               get
               {
                     return controller.getHasNext();
               }
              set;
            }  
        
            public Boolean hasPrevious
            {
               get
               {
                   return controller.getHasPrevious();
               }
               set;
            }
Suggest me any idea how to achieve it.

Thanks,
Bujji

  • August 07, 2014
  • Like
  • 0
Hi Guys,

I am trying to show the user lookup in VF page. Unfortunately i am not able to as it showing any lookup icon. Below is my controller code and vf code.
How to show Lookup Icon, so that user can select the user.

* All fields are showing lookup except the Id

public User usr {get;set;}

<apex:outputLabel >User Lookup: </apex:outputLabel>
<apex:inputField value="{!usr.Id}"/>

Thanks,
Bujji
  • July 21, 2014
  • Like
  • 0

Hi Guys,

 

I have a piece of code in php to implement Captcha, but exactly i don't know how to implement this one visualforce and apex.. If anybody knows how to do it please explain how to implement.

 

Below is the code of php..

 

 <?php session_start(); ?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Author" content="Jose Rodriguez" />
<title>Captcha test</title>
<style type="text/css">
body { font-family: sans-serif; font-size: 0.8em; padding: 20px; }
#result { border: 1px solid green; width: 300px; margin: 0 0 35px 0; padding: 10px 20px; font-weight: bold; }
#change-image { font-size: 0.8em; }
</style>
</head>
<body onload="document.getElementById('captcha-form').focus()">

< ?php

/** Validate captcha */
if (!empty($_REQUEST['captcha'])) {
    if (empty($_SESSION['captcha']) || trim(strtolower($_REQUEST['captcha'])) != $_SESSION['captcha']) {
        $captcha_message = "Invalid captcha";
        $style = "background-color: #FF606C";
    } else {
        $captcha_message = "Valid captcha";
        $style = "background-color: #CCFF99";
    }

    $request_captcha = htmlspecialchars($_REQUEST['captcha']);

    echo <<<HTML
        <div id="result" style="$style">
        <h2>$captcha_message</h2>
        <table>
        <tr>
            <td>Session CAPTCHA:</td>
            <td>{$_SESSION['captcha']}</td>
        </tr>
        <tr>
            <td>Form CAPTCHA:</td>
            <td>$request_captcha</td>
        </tr>
        </table>
        </div>
HTML;
    unset($_SESSION['captcha']);
}

?>

<p><strong>Write the following word:</strong></p>

<form method="GET">
<img src="captcha.php" id="captcha" /><br/>

<!-- CHANGE TEXT LINK -->
<a href="#" onclick=" document.getElementById('captcha').src='captcha.php?'+Math.random(); document.getElementById('captcha-form').focus();"
    id="change-image">Not readable? Change text.</a><br/><br/>

<input type="text" name="captcha" id="captcha-form" autocomplete="off" /><br/>
<input type="submit" />

</form>

</body>
</html>

 

Thanks,

Bujji

  • October 21, 2013
  • Like
  • 0

Hi,

 

Is anybody implemented captcha apart from Google Re-Captcha. If so please suggest me some nice Captcha.

I have done recaptcha.. but i have some alignment problem..

 

Thanks,

Bujji

  • October 15, 2013
  • Like
  • 0

Hi,

 

I am creating a task from the vf page, is it possible to re-order the list in 'Related To' field. Currently 'Account' is the default value. I want Opportunity as the default/first value in the list.

 

how to do it.

 

i tried Task mytask = new Task(what = 'Opportunity');   but  i am getting error saying what is not writable field.

 

Thanks,

Bujji

  • October 07, 2013
  • Like
  • 0

Hi Guys,

 

Need Test calss for the below class.

 

public class accountdisplylink
{
        public string err{get;set;}
        public String ContryName{get;set;}
        //public String SearchtextAlpha{get;set;}    
        public ApexPages.StandardSetController con{get; set;}
        public accountdisplylink()
        {
            ContryName = Apexpages.currentPage().getParameters().get('name');
        }
          public List<Account> searchResults
            {
                get
                {
                    if(con != null)
                        return (List<Account>)con.getRecords();
                    else
                        return null ;
                }
                set;
            }               
        public pagereference search()
            {     
                ContryName = Apexpages.currentPage().getParameters().get('name');
                if(ContryName != null &&  !ContryName.trim().equals('') )
                {
              
               err='';
                 string baseQuery = 'Select Id,Name,BillingCity,BillinState,BillingPostalCode,Type from Account ';
                 string finalQuery = baseQuery +'WHERE Territory =\''+ContryName+'\' AND Customer_Type__c = \'Permanent\' Order By Name ';
                 con = new ApexPages.StandardSetController(Database.getQueryLocator(finalQuery));
                 con.setPageSize(300);
                 }
         return null;
               }
          
           public void PREVIOUS()
            {
                 con.PREVIOUS();            
            }
            public void NEXT()
            {
                 con.next();
            }
            public Boolean hasNext
            {
            get
            {
            return con.getHasNext();
            }
            set;
            }           
            public Boolean hasPrevious
            {
            get
            {
            return con.getHasPrevious();
            }
            set;
            }
   
}

 

 

Thanks,

Bujji

  • July 17, 2013
  • Like
  • 0

Hi Guys,

 

I have a List coming from the controller into the page. I want to show this list values in seperate vlues.

Is it possible, if so how to do it. for example if am doing like below all the values coming in single column

 

<apex:column headerValue ="Test">

<apex:repeat value="{!account.ContactsName}" var="con">

     <apex:outputText >{!con.Name}, </apex:outputText>

</apex:repeat>

</apex:column>

 

o/p is   

 

Test

--------

Name1,Name2,Name3,Name4

 

 

But i want the output like below, for the columns headers i can create columns but i want Names in different columns.

 

Test 1            Test 2          Test 3

-------            ----------          ----------           ..............

Name 1        Name2        Name3

 


Please give me some idea. Very Urgent.

 

Thanks,

Bujji

  • July 12, 2013
  • Like
  • 0

Hi Guys,

 

what is the limit of Mass Stay-In-Touch emails per day?

 

Thanks,

Bujji

  • July 04, 2013
  • Like
  • 0

I am using the native mobile iOS SDK of Salesforce to store data offline and synchronizing back to the server. I was able to upsert entries to the smartstore database. I need to synchronize now. I could find no method in the SmartStore API which enables me to upload data to the salesforce.com. Would you be able to point me to the right direction about how to achieve this?