• ran67
  • NEWBIE
  • 5 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 108
    Questions
  • 116
    Replies

Hi

How to fetch 10000 recordsusing the database.getquerylocator in class can any one help.

thanks in advance

  • November 21, 2013
  • Like
  • 0

Hi,

I have small doubt , i have integared the webhook to salesforce.

In my requirement when i change the    status  of my record  in the campagin mointor 

A site url is  posted  to the salesforce am able to run my  visualforce page and class.

am able to get all the header when am using the 

  MAP<String,String> s1=ApexPages.currentpage().getHeaders();

 am able to get  all the header related to the request .

In that request it contains  json data . now am want to read the json  data and i need to update record in salesforce am able to get the content length and content type.I want the json data  from it

 

 

 

  • November 13, 2013
  • Like
  • 0

Hi,

I have activate my site url in the campagain mointor and now am  able to run my class and page when a  record is edit in the webhook . as per document they  told when the url is executed the json data  will  added . bt when am making the http request Post to the site url am   getting the error has 401 of the error has unauthorized error.

Can you please how to  call the post Request  in the salesforce and read the json data .

  • November 12, 2013
  • Like
  • 0

Hi Guys, I have small doubt in the webhook integrations (Campagian Moinitor) , http://www.campaignmonitor.com/ I have created a new list in the campagin mointor and am able to pass the name and email id from salesforce and able to update status. Now my requirement is when i change the status in campagain mointor for one record into need update the status in the salesforce record also directly . can you please help in this . how to solve my problem

How to use the call back url in salesforce and how  i could i approach this above functionality

  • November 08, 2013
  • Like
  • 0

Hai all,

 

 

      i have a problem in getting file body  using     input type="file" name="file"  to the controller for insert a attachment 

 

where as i am getting file body directly using

visualforce page

 <apex:inputfile value="{!filebody}" filename="{!filename}"/>

 

controller:

 

  Attachment myAttachment = new Attachment();
        myAttachment.Body = fileBody;                         //line 1
        myAttachment.Name = fileName;  
        myAttachment.ParentId = CurrentParentId;          
        insert myAttachment; 

 

but the reason why i am asking only by input type=" file" because i have to upload multiple files(multi attchments) which is not possible using apex:inputfile

 

like line 1 how can i get file body using input type="file" to the controller

 

please help me in sloving this problem its bit urgent

  • August 01, 2013
  • Like
  • 0

Hai ,

 

      I have a small problem with package creating and using it in controller and page and component .

 

      i have class and page and a component which is working fine but after creating a package i got namespace prefix for creating app  from that time i am unable to run my page. 

 

     is there any thing to add in code i have sreached a lot but not got correct way to slove it , so please help me in this it is bit urgent  

  • July 26, 2013
  • Like
  • 0

Hai 

 

i have an requrement on multi file uploading which should support IE browser i have done so much search on this but still no result can anybody please help me on this is urgent .

 

 

 

 

 

Thanks 

  • June 28, 2013
  • Like
  • 0

Hai all.

 

    i have small problem with apex:actionfunction . i have a requirement to upload a file to amozon server using visualforce page and also creates a record in accountdocument  

Controller:

public class abc

{

 public AccountDocuments queryvalues{get;set;}

 public  void page2onLoad() {

                      insert createid; // it creates id in amozon 

}

 

 public PageReference updatingFiledetails() 
    { 

 queryvalues=[select id,Name,Size,Type from AccountDocuments where id=:createid];

queryvalues.Name= Apexpages.currentPage().getParameters().get('one');

queryvalues.Type= same way gets file type from page using javascript to update 

queryvalues.Size=same way gets file size from page using javascript to update

update  queryvalues;

return null;

 

     }

}

}

 

Visualforce page:

<apex:page>

<input id="fileid" name="file" type="file" onchange="finalfun();"/>

<apex:actionFunction name="page2load1" action="{!page2onLoad}"/>

 

<apex:actionFunction name="hitMe" action="{!updatingFiledetails}">

<apex:param name="one" value=""/>

</apex:actionFunction>

 

<script>

function finalfun()

{

//calling the function to create id

page2load1();

..................

.................

.................

get file details using input file type

.................

................

................

//callling the function to update the record using the id

hitMe(value1,value2,value3)   // values to pass the controller to update

}

</script>

</apex:page>

 

 

it is working fine in chromo browser but it is not working some times in firefox which i want it is creating a record in accountdocument  with out updating the filename,size and type in the fields . 

the function in script hitMe() is some times calling and some times it is not calling 

i am unable to find the error in that  will you please help me in this solve i am trying this from soo many days 

  • June 14, 2013
  • Like
  • 0

Hi all,


       I have a small requiremnet where i need to click a  apex:commandbutton using javascript because it perform one action. which should be only done by javascript on load

 

i have tried in html it is working fine but not working in salesforce

<button id="d">Button #1</button>

  document.getElementById("d").click();

 

i have tried in salesforce like this but it is not working

<apex:commandButton id="cmdUpload11" action="{!page2onLoad}"  value="cccc"/>

window.onload=function onclickdemo()

{

document.getElementById('cmdUpload11').click();

}


Please Help me to solve this issue its urgent

  • June 10, 2013
  • Like
  • 0

Hi

 when am Executing the visualforcepage . here am using the Search Filter to display the Time sheet Record based on the Project we have selected  and am getting the view state Error

Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 135.875KB
  • May 17, 2013
  • Like
  • 0

Hi

I have Created an visualforcepage, for that visualforcpage i have created a tab. when i click on the tab it will open

my page. and in addressbar am passsing the visualforcepage name and tab id.

but now i want to disable the address bar when i clik on that tab..

please help me

 

 

thanks  in advances

  • November 07, 2012
  • Like
  • 0

Hi

in my class am using   the http request am sending the Request and am getting the Response  in the xml tree.

Then i have  parse the xml tree and am able to display the three fields,

Filename,Filesize, date . am able to display only 40 records on the Page when i have more than 40 records am getting  error has Too many script Statments 20001   am Hitting that Error

 

String response1 = res.getBody();

xmldom d;

 D = new xmldom(response1);

for(XMLDOM.Element DOMs:d.getElementsByTagName('Key'))
{
ADDXMLDOM.add(DOMs);
}

for(integer i=0;i<ADDXMLDOM.size();i++)
{

    ss=d.getElementsByTagName('sss')[i].nodeValue;

}

keys.add(ss);

 

  • November 01, 2012
  • Like
  • 0

Hi

I have created an dynamic Picklist 

suppose

I have four value in Picklist

Picklist value A

Picklist value B

Picklist value c

Picklist value D

.Each Picklist value Has some record  when i click on that Picklist value it must excute  display that records onthe Page

Please Help Me to resolve it

 

thanks in advnace

  • October 26, 2012
  • Like
  • 0

Hi

I have Install the Amazon webservice tool kit into my  developer Account.

Now am able to Upload file,download file ,delete file.

But Now i want to add the Usertoken to My bucket and that must  be added when file uploading, downloading & deleting file from s3.

can  u  please help  me.....

 

 

thanks in  advances

  • September 14, 2012
  • Like
  • 0

Hi

How To Delete The Record from S3 .By using the Rest Request.

When am  trying to Pass the Rest request to delete the Record from S3 .I am getting the  following error 

Signature doe not match.

how to Pass the request using the Rest.

I have used the following  synatx ,

but not working

 

DELETE /paris.jpg HTTP/1.1
Host: travel-maps.commondatastorage.googleapis.com
Date: Mon, 15 Feb 2010 11:00:00 GMT
Content-Length: 0
x-goog-api-version: 2
Authorization: OAuth 1/zVNpoQNsOSxZKqOZgckhpQ

  • September 04, 2012
  • Like
  • 0

Hi

I am Retriving the Opportunitylineitem  and  am able to displaying in the Pageblocktable on the page of the curent Products

I have more than 500 records. i am not display on the Page.

i want to keep the Pagination can u please help me

Historicaloppl=[select id,unitprice,PricebookEntry.Product2Id,product__c,PricebookEntry.Product2.Name,Opportunity.Product__r.Id,Product__r.Name,
Opportunity.Product__r.name,Purchase__c, PricebookEntryId,ServiceDate,Quantity,Action__c,Vendor__r.Name ,Opportunity.Name,Opportunity.StageName
from OpportunityLineItem where opportunityid!=: OPP.id and product__c=:userinput.product__c order by unitprice ];

  • August 30, 2012
  • Like
  • 0

hi

I have created a custom link to download the file..It is working fine

But that i want the download in a formula field of text.

tio be 

these my url

 

/apex/test?id={!Account__c.Id}&childObjectName='Account__c'&FILETYPEAPI='File_Type__c'

now want in a formula field  of  that record

how can i do it.,,

 

thanks in advance

  • August 23, 2012
  • Like
  • 0

hi

how to  declare these part in testcase

Public  class test

{

public test(string  color,string item)

{

this.color=color;

this.item=item;

}

}

how to decalre the Parametrized constructor in testcase ........please help me

 

  • August 21, 2012
  • Like
  • 0

Hi

I  have Done the Search Operation By using Product in Opportunitylineitem .It is Working Fine . and display Related search in 

pageblocktable.

But if  i try to use the Pagination for Opportunity lineitem

I am getting the following Error.

List controllers are not supported for OpportunityLineItem

 

 

 

can u please Help me to solve my Problem.

 

 

thanks in advance 

  • August 17, 2012
  • Like
  • 0

how to get the  each field  vlaue .when we are using the sobject

hi here  am getting the values of an object but i want only one field value

how can get only one fileld using the soject.

and i want  that field to update another string

By using the id we have got the object name and getting all the field valuees

 

accId = '001900000092EV2';
String prefix= accId.subString(0,3);

String objectName = objectMap.get(prefix);
system.debug('&&&&&&&'+objectName);
Map<String, Schema.SObjectField> desResult = Schema.getGlobalDescribe().get(objectName).getDescribe().Fields.getMap();
system.debug('desResult '+desResult );
List<String> fieldList = new List<String>();
system.debug('fieldList '+fieldList );

fieldList.addAll(desResult.keySet());

for(integer i =0;i<fieldList.size();i++)
System.debug(fieldList[i]);

String Query = 'SELECT ';
for(integer i =0;i<fieldList.size();i++)
Query += fieldList.get(i) + ',';

Query = Query.subString(0,Query.length()-1);
system.debug('+++++++++++'+query);
Query += ' FROM ' + objectName ;
query += ' WHERE ID= \''+ID+'\''; // modify as needed


sobject s1= Database.Query(Query);
system.debug('*&&&&&&&&&*'+s1);

 

  • August 16, 2012
  • Like
  • 0

Hi

How to fetch 10000 recordsusing the database.getquerylocator in class can any one help.

thanks in advance

  • November 21, 2013
  • Like
  • 0

Hi,

I have small doubt , i have integared the webhook to salesforce.

In my requirement when i change the    status  of my record  in the campagin mointor 

A site url is  posted  to the salesforce am able to run my  visualforce page and class.

am able to get all the header when am using the 

  MAP<String,String> s1=ApexPages.currentpage().getHeaders();

 am able to get  all the header related to the request .

In that request it contains  json data . now am want to read the json  data and i need to update record in salesforce am able to get the content length and content type.I want the json data  from it

 

 

 

  • November 13, 2013
  • Like
  • 0

Hi,

I have activate my site url in the campagain mointor and now am  able to run my class and page when a  record is edit in the webhook . as per document they  told when the url is executed the json data  will  added . bt when am making the http request Post to the site url am   getting the error has 401 of the error has unauthorized error.

Can you please how to  call the post Request  in the salesforce and read the json data .

  • November 12, 2013
  • Like
  • 0

Hi Guys, I have small doubt in the webhook integrations (Campagian Moinitor) , http://www.campaignmonitor.com/ I have created a new list in the campagin mointor and am able to pass the name and email id from salesforce and able to update status. Now my requirement is when i change the status in campagain mointor for one record into need update the status in the salesforce record also directly . can you please help in this . how to solve my problem

How to use the call back url in salesforce and how  i could i approach this above functionality

  • November 08, 2013
  • Like
  • 0

I have a method that returns a Map<Id, List<Id>>

 

Here is the method:

 

private Map<Id, List<Id>> getDbrToAccountMap(Set<Id> dbrIds) {
    Map<Id, List<Id>> dbrAccountMap = new Map<Id, List<Id>>();
    List<Id> accountIds = new List<Id>();
    for(DBR_Group_Member__c member : [select Id, Contact__c, Contact__r.AccountId, DBR__c from DBR_Group_Member__c where DBR__c in: dbrIds]) {
        if(accountIds.isEmpty()) {
            accountIds = new List<Id>();
            dbrAccountMap.put(member.DBR__c, accountIds);
        }
        accountIds.add(member.Contact__r.AccountId);
    }
    return dbrAccountMap;
}

 

I only want to add to the list of accountIds for a unique DBR_c and unique account of the Contact_c

 

For example, if I have a DBR number of:

 

3333 and the contact is John Smith that is on the Acme account (add to the list)

next I have

3333 and the contact is Jane Smith that is on the Acme account (don't add to the list)

next I have

3333 and the contact is Bob Smith that is on the Big Company account (add to the list)

next I have

3333 and the contact is Doug Smith that is on the Big Company account (don't add to the list)

 

The DBR to account should be distinct.

 

In my method, I'm returning the accountIds, but they are not distinct based on the DBR.  I have to be careful because I don't want to remove a duplicate accountId in the list if the DBR number was different.  That would be a valid element in the list.

 

I was thinking instead of returning a Map<Id, List<Id>> I could return a Map<Id, Map<Id, List<Id>>> where the key to the outer map is the DBR__c and the value in the inner map.  The key to the inner map would be the contact and the value would be the list of account ids.  I was trying that, but couldn't get it to work correctly.

 

Any help would be appreciated.

Thanks.

Hai all,

 

     I am new to visualforce page faceing problem in multi file uploading to a particular record  i have searched a lot but i got this link which is working fine till 2.10 MB files but salesforce allows upto 5 MB uploading so is there any way to extend this functionality 

http://www.tehnrd.com/multi-file-uploader-for-salesforce-oh-ya-and-progress-bars-too/ 

 

        Please help me in sloving this 

Hai all,

 

 

      i have a problem in getting file body  using     input type="file" name="file"  to the controller for insert a attachment 

 

where as i am getting file body directly using

visualforce page

 <apex:inputfile value="{!filebody}" filename="{!filename}"/>

 

controller:

 

  Attachment myAttachment = new Attachment();
        myAttachment.Body = fileBody;                         //line 1
        myAttachment.Name = fileName;  
        myAttachment.ParentId = CurrentParentId;          
        insert myAttachment; 

 

but the reason why i am asking only by input type=" file" because i have to upload multiple files(multi attchments) which is not possible using apex:inputfile

 

like line 1 how can i get file body using input type="file" to the controller

 

please help me in sloving this problem its bit urgent

  • August 01, 2013
  • Like
  • 0

Hai ,

 

      I have a small problem with package creating and using it in controller and page and component .

 

      i have class and page and a component which is working fine but after creating a package i got namespace prefix for creating app  from that time i am unable to run my page. 

 

     is there any thing to add in code i have sreached a lot but not got correct way to slove it , so please help me in this it is bit urgent  

  • July 26, 2013
  • Like
  • 0

Hai 

 

i have an requrement on multi file uploading which should support IE browser i have done so much search on this but still no result can anybody please help me on this is urgent .

 

 

 

 

 

Thanks 

  • June 28, 2013
  • Like
  • 0

Hai all.

 

    i have small problem with apex:actionfunction . i have a requirement to upload a file to amozon server using visualforce page and also creates a record in accountdocument  

Controller:

public class abc

{

 public AccountDocuments queryvalues{get;set;}

 public  void page2onLoad() {

                      insert createid; // it creates id in amozon 

}

 

 public PageReference updatingFiledetails() 
    { 

 queryvalues=[select id,Name,Size,Type from AccountDocuments where id=:createid];

queryvalues.Name= Apexpages.currentPage().getParameters().get('one');

queryvalues.Type= same way gets file type from page using javascript to update 

queryvalues.Size=same way gets file size from page using javascript to update

update  queryvalues;

return null;

 

     }

}

}

 

Visualforce page:

<apex:page>

<input id="fileid" name="file" type="file" onchange="finalfun();"/>

<apex:actionFunction name="page2load1" action="{!page2onLoad}"/>

 

<apex:actionFunction name="hitMe" action="{!updatingFiledetails}">

<apex:param name="one" value=""/>

</apex:actionFunction>

 

<script>

function finalfun()

{

//calling the function to create id

page2load1();

..................

.................

.................

get file details using input file type

.................

................

................

//callling the function to update the record using the id

hitMe(value1,value2,value3)   // values to pass the controller to update

}

</script>

</apex:page>

 

 

it is working fine in chromo browser but it is not working some times in firefox which i want it is creating a record in accountdocument  with out updating the filename,size and type in the fields . 

the function in script hitMe() is some times calling and some times it is not calling 

i am unable to find the error in that  will you please help me in this solve i am trying this from soo many days 

  • June 14, 2013
  • Like
  • 0

Hi all,


       I have a small requiremnet where i need to click a  apex:commandbutton using javascript because it perform one action. which should be only done by javascript on load

 

i have tried in html it is working fine but not working in salesforce

<button id="d">Button #1</button>

  document.getElementById("d").click();

 

i have tried in salesforce like this but it is not working

<apex:commandButton id="cmdUpload11" action="{!page2onLoad}"  value="cccc"/>

window.onload=function onclickdemo()

{

document.getElementById('cmdUpload11').click();

}


Please Help me to solve this issue its urgent

  • June 10, 2013
  • Like
  • 0