• 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

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

 

 

 

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 .

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

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

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  

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 

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 

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