• khillan bhardwaj
  • NEWBIE
  • 89 Points
  • Member since 2013

  • Chatter
    Feed
  • 2
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 22
    Questions
  • 31
    Replies
it has to print :

csedeep7@gmail.com
<apex:outputField value="{!contact1.email}"/>
it is printing like this :

csedeep7@gmail.com [ Gmail]
can i know what is the issue
Hi,

I have received error "Insufficient User rights" when we  save new Quote record."

creteria is as below:
The owd of Opportunity is "Private".but by shaing rule it is accessible by another user with read/Write access.The  user who have read/Write access to opportunity using sharing rule try to click on new quote. but he received error of "Insufficient User rights".
but he can edit the existing Quote record related to same opportunity.

Can someone let me know how to do some configuration setting to allow user to create "Quote" without changing owd of opportunity.
 
I have a custom Vf page publisher action,
User-added image

My objective is to hide/ rename "Save" button.

I have used following code. by following code "Save" button is enabled and we can perform any javavascript action.But i want to hide/rename "Save" button in salesforce1.
 
<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script>
    <script> Sfdc.canvas.publisher.subscribe({name: "publisher.showPanel",onData:function(e) {
                Sfdc.canvas.publisher.publish({name:"publisher.setValidForSubmit", payload:"true"});
			}});
        Sfdc.canvas.publisher.subscribe({ name: "publisher.post",
        onData: function(e) {
            //alert("any javascript call");
            Sfdc.canvas.publisher.publish({ name: "publisher.close",payload:{ refresh:"true" }});
    }}); 
        
            
    </script>

If someone has any idea please let me know.Help is really appreciated.

Thanks
Khillan

 
Hi, 

I want to call static method dynamically.class or static method present in org should not checked when code is save .It should check at runtime.
we can check whether class present of not  dynamicallylike below:

 Type t = Type.forName('classname');

But I have not found way to execute staic method at run time.

If someone have idea please let me know.Help is really appreciated.

Thanks
Khillan 
Hi,

I want to get plainText from rtf text in the trgger.the rtf text is present the the custom fields as below:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}} {\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\f0\fs17 Ben called with updated CC info 7/3/14...going forward use\par \par 4856 3100 1190 8431 \par exp 12/16 \fs17 }

Can any let me know how to get plainText from this rtf text.

Thanks
Khillan 

Hi,

I want to retrieved dependent picklist value.I am able to do it by javascript. but i need to use in trigger. In trigger you know we can not excute javascript.
If any one have sample code to get depenedent picklist(either Schema or MetaData Api) values please let me know.It is urgent.

Thanks
Hi,

I want ot retrieve all the wordpress post from self hosted website.i have try following endpoint 'https://public-api.wordpress.com/rest/v1/sites/<sitename>/posts?preety=1'.when i hit the end point then i got following responce 
{
    "error": "unauthorized",
    "message": "API calls to this blog have been disabled."
}
I do not know how to enable API call for this blog.at the sametime i have create one more blog with name ksingh2.wordpress.com. and hit the endpoint 'https://public-api.wordpress.com/rest/v1/sites/ksingh2.wordpress.com/posts?preety=1' then i am able to get the responce sucessfully

Please let me know what is possiblity to retrieve posts of self hosted sit on wordpress

Thanks
Khillan
Hi All,

I want to integrate with Facebook from Salesforce. I am able to create post on wall by using graph api of Facebook. but i want to send/Recieve  private message by using apex.I have used Javescript FB.ui{} method to send message.but using FB.ui user need to login to the popup window. Is there is any other way to send message by using rest api.
Please let me know it is urgent.

Please let me know end point and parameters requied to send private message.

Thanks
Khillan Singh
Hi,

I want to create record of quota,and want to show records of quota that user of particular profile own.I have enable the forecast object and check the 'show quota' check box to true.I have implement the function, but i do not know whether is write or wrong.

when user click on forecast tab is show forcast value that we set in forecast setting like quarters or months.and show the records of opportunity.
i show only those opportunity that that user has created but not show other user's created opportunity.

Please let me know whether this functionality is right or not. please suggest me some solution

Thanks

Hi ,

I need to integrate of beanstream with salesforce. i have create sanbox of beanstream. Can some once let me know the apex code  for intregation with beansstream

Thanks
Khillan Singh
Hi All,I need to to do integration from salesforce to linvio . is these is any apex code please let me know.

Thanks
Khillan Singh
Hi All,

I need to do payment from salesforce to paypal by using doDirectPayment method , in the i am getting Expception 'The element type "p" must be terminated by the matching end-tag "</p>".' I get the respponse in following form :'<HTML><HEAD>
<TITLE>Invalid URL</TITLE>
</HEAD><BODY>
<H1>Invalid URL</H1>
The requested URL "&#47;2&#46;0", is invalid.<p>
Reference&#32;&#35;9&#46;1ce0fc7d&#46;1387534802&#46;12140fd8
</BODY></HTML>'

please let me know where is the problem .The method written by me to for payment is :
"
public String doDirectPayment()
  {
   
    Http h = new Http();
    HttpRequest req = new HttpRequest();
  //String url = 'https://api-3t.sandbox.paypal.com/2.0';
    String url = 'https://api-3t.sandbox.paypal.com/2.0';
    string un = 'ksingh2-facilitator_api1.astreait.com';
    string pw = '1386759617';
    string sig = 'AFcWxV21C7fd0v3bYYYRCpSSRl31AeW1L0989VvCKlBMtw6BBk5qEslE';
   
   
    String doDirectRequest;
    doDirectRequest =  '<soap:Envelope xmlns:soap=' + '\"' + 'http://schemas.xmlsoap.org/soap/envelope/'  + '\"' + ' xmlns:xsi=' + '\"'+ 'http://www.w3.org/2001/XMLSchema-instance'  + '\"' + ' xmlns:xsd=' + '\"'+ 'http://www.w3.org/2001/XMLSchema' + '\"' + '>';
    doDirectRequest += '<soap:Header><RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"><Credentials xmlns="urn:ebay:apis:eBLBaseComponents">';
    doDirectRequest += '<Username>' + un + '</Username><ebl:Password xmlns:ebl="urn:ebay:apis:eBLBaseComponents">' + pw;
    doDirectRequest += '</ebl:Password><Signature>' + sig + '</Signature>';
    doDirectRequest += '</Credentials></RequesterCredentials></soap:Header><soap:Body><DoDirectPaymentReq xmlns="urn:ebay:api:PayPalAPI">';
    doDirectRequest += '<DoDirectPaymentRequest><Version xmlns="urn:ebay:apis:eBLBaseComponents">1.00</Version>';
    doDirectRequest += '<DoDirectPaymentRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents">';
    doDirectRequest += '<PaymentAction>Sale</PaymentAction><PaymentDetails><OrderTotal currencyID="USD">' + amount + '</OrderTotal>';
    doDirectRequest += '<ShipToAddress><Name>' + FirstName + ' ' + LastName + '</Name><Street1>' + Addy1 + '</Street1><Street2>' +Addy2 + '</Street2>';
    doDirectRequest += '<CityName>' + city + '</CityName><StateOrProvince>' + state + '</StateOrProvince><PostalCode>' + zip + '</PostalCode>';
    doDirectRequest += '<Country>' + country + '</Country></ShipToAddress>';
    doDirectRequest += '</PaymentDetails><CreditCard><CreditCardType>' + CardType + '</CreditCardType><CreditCardNumber>' + CardNo + '</CreditCardNumber>';
    doDirectRequest += '<ExpMonth>' + expMo + '</ExpMonth><ExpYear>' + expYe + '</ExpYear><CardOwner><PayerStatus>verified</PayerStatus>';
    doDirectRequest += '<PayerName><FirstName>' + FirstName+ '</FirstName><LastName>' + LastName + '</LastName></PayerName><PayerCountry>' + country + '</PayerCountry>';
    doDirectRequest += '<Address><Street1>' + Addy1 + '</Street1><Street2>' + Addy2 + '</Street2><CityName>' + city + '</CityName>';
    doDirectRequest += '<StateOrProvince>' + state + '</StateOrProvince><Country>' + country + '</Country><PostalCode>' + zip + '</PostalCode></Address>';
    doDirectRequest += '</CardOwner><CVV2>' + CVV + '</CVV2></CreditCard></DoDirectPaymentRequestDetails>';
    doDirectRequest += '</DoDirectPaymentRequest></DoDirectPaymentReq></soap:Body></soap:Envelope>';
    System.debug('---------------'+doDirectRequest );
    req.setBody(doDirectRequest);
   
    req.setEndpoint(url);
    req.setMethod('POST');
    req.setHeader('Content-length', '1753' );
    req.setHeader('Content-Type', 'text/xml;charset=UTF-8');
    req.setHeader('SOAPAction','');
    req.setHeader('Host','api-aa.sandbox.paypal.com');
    HttpResponse res = h.send(req);
    String xml = res.getBody();
    System.debug('xml----------------------'+xml);
    rawResponse = xml;
    system.debug('::' + rawResponse);
    XmlStreamReader reader = res.getXmlStreamReader();
    result = readXMLResponse(reader,'Ack');
    reader = res.getXmlStreamReader();
    err = readXMLResponse(reader, 'LongMessage');
   
    if (result == 'Success')
    {
      reader = res.getXmlStreamReader();
      transid = readXMLResponse(reader, 'TransactionID');
        system.debug('::' + transid );
    }
    else
    {
      result = err;
   }
   return result;
}

"

Hi,

 

    I am using Vf Email Template which is used by Workflow. In the template i need to send the Attachment file of Attachment of the relatedTo object.Is there is any way to do it please let me know.

 

I know this can be done by using Apex trigger.but i need to send email by workflow

 

Thanks

 

Khillan Singh

 

Hello,

           i want to add onclick or doubleclick event on the table cell . the problem is because of following .

1.        table is seletabe. when we click on the table the select event is invoke which is written in jquery. associated with id of table.

if any one have solution plz let me know

 

thanks and Regards

 

khillan singh

hi all,

 i am using inbound email service in which i am creating new record  on the base of the email recieve configure in email service setting . but i am recieving the email the record is created by attachment record is not created my code is as follow . if some one know solution plz let me know

 

global class EmailServiceHandler implements Messaging.InboundEmailHandler {
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) {
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
EmailServiceDemo__c esd=new EmailServiceDemo__c(name=email.subject);
esd.EmailPlainText__c=email.plainTextBody;
System.debug('========================email.plainTextBody'+email.plainTextBody);
esd.email__c='test@gmail.com';
upsert esd;


// Save attachments, if any
if (email.textAttachments != null)
{
System.debug('===================Text attachment i not null');
for(Messaging.Inboundemail.TextAttachment tAttachment : email.textAttachments)
{
Attachment attachment = new Attachment();
attachment.Name = tAttachment.fileName;
attachment.Body = Blob.valueOf(tAttachment.body);
attachment.ParentId = esd.Id;
insert attachment;
}

}

//Save any Binary Attachment

if (email.binaryAttachments != null)

{
System.debug('===================binary attachment i not null');
for(Messaging.Inboundemail.BinaryAttachment bAttachment : email.binaryAttachments) {
Attachment attachment = new Attachment();

attachment.Name = bAttachment.fileName;
attachment.Body = bAttachment.body;
attachment.ParentId = esd.Id;
insert attachment;
}
}

//Attachment a=new Attachment();
// a.body=email.TextAttachment[0].body;
// a.parentId=esd.id;
return result;
}
}

 

thanks 

khillan singh

hello sir,

 

i want to share data between two organization. I have create connection between two organization. i also publish object and like account or contact. i also public object . but i do not know how to share record between organization .

if you guys know solution plz let me know step by step to share the records using salesforce to salesforce

 

thanks & Regards 

khillan singh

hello all,

              i want to create custum button by using apex class. i know rarely it possible. but i have such require ment . i can create custom button for standard button and add then in package . but in oganization in which package installed may have a number of custum object in which i want to add custom button on detail page . if there is any pssiblity to create custom button by apex code plz let me know

 

thanks & Regards

khillan singh

Dear sir ,

 

  the following code show list of OpportunityLineItem . is there is any possible way to sort this list by date or name.means accending or Decending Order . 

i know we can do such thing by using controller but i want to do this without any controller means either we can use javascript code in vf page. if u have solution then plz let me know

       

<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line">

Dear Sir,

 

i have picklist on detail page when someone make inline edit on detail page i want to show warning message "when user try to change the pictlist value" i have did this edit page . by adding event 'onchange' .by  writing javascript  code in home page component:

 

<script>
var originalOnLoad = window.onload;
var pickValue;
var pickChange;
function testTurbine() {
originalOnLoad();
var currURL = document.URL;
if(currURL.indexOf("006") !=-1){
pickChange=document.getElementById('00N900000067ev1');
if(pickChange==null){
pickChange=document.getElementById('00N900000067ev1_ileinner');
pickChange.setAttribute("ondblclick","confirmMessage1();");
}
pickValue=pickChange.value;
pickChange.setAttribute("onchange","confirmMessage();");
}
if(currURL.indexOf("a03") != -1) {
var lookupId = document.getElementById('CF00N90000004Sw0L_lkwgt');
lookupId.setAttribute("href","javascript&colon;openFilterLookup()") ;
}
}

function confirmMessage1(){
pickChange= document.getElementById('00N900000067ev1');
pickChange.setAttribute("onchange","confirmMessage();");
pickValue=pickChange.value;
}
function confirmMessage(){
var v=confirm("Warning: changing field “Estimate at Job or Project” can result in data loss - Are you sure?");
if(v){
pickValue=pickChange.value;
}else{
pickChange.value=pickValue;
}
}

</script>

 

but in case of inline editing id of the picklist is created when i double click on the field. so in this way i am searchin a code either in javascript, or jquery. which bind the event whenever  that element is create .

Or . i need a code which can bind with id as soon as that id created of the  element .

 

Dear Sir ,

            i want to calculate no. of the picklist values avaiable in the multiselect picklist of the Object and i want to show that counted value in the vf page

 

thanks u

Hi,

I want to create record of quota,and want to show records of quota that user of particular profile own.I have enable the forecast object and check the 'show quota' check box to true.I have implement the function, but i do not know whether is write or wrong.

when user click on forecast tab is show forcast value that we set in forecast setting like quarters or months.and show the records of opportunity.
i show only those opportunity that that user has created but not show other user's created opportunity.

Please let me know whether this functionality is right or not. please suggest me some solution

Thanks

Hi ,

I need to integrate of beanstream with salesforce. i have create sanbox of beanstream. Can some once let me know the apex code  for intregation with beansstream

Thanks
Khillan Singh
Hi, 

I want to call static method dynamically.class or static method present in org should not checked when code is save .It should check at runtime.
we can check whether class present of not  dynamicallylike below:

 Type t = Type.forName('classname');

But I have not found way to execute staic method at run time.

If someone have idea please let me know.Help is really appreciated.

Thanks
Khillan 
Hi,

I want to get plainText from rtf text in the trgger.the rtf text is present the the custom fields as below:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}} {\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\f0\fs17 Ben called with updated CC info 7/3/14...going forward use\par \par 4856 3100 1190 8431 \par exp 12/16 \fs17 }

Can any let me know how to get plainText from this rtf text.

Thanks
Khillan 
Hi Everyone

How can I determine (in Apex code) all the visualforce pages on a given Org. I want present a list of them for selection to a user in a VF Page.

Many thanks for any assistance.
Ross
 
I would LOVE to pilfer the knowledge spelt out in this thread below:

https://developer.salesforce.com/forums/ForumsMain?id=906F000000093fwIAA

but the last known state was the OP posting "oh I found a way to fix it" without actually stating what it was. Anyone reckon they can help pick up the loose end for me.

Essentially, this is his code:

trigger Changeownertrigger on Account (after insert,after update) {
      Set<Id> accountIds = new Set<Id>();
      Map<Id, String> oldOwnerIds = new Map<Id, String>();
      Map<Id, String> newOwnerIds = new Map<Id, String>();
      Contact[] contactUpdates = new Contact[0];
      for (Account a : Trigger.new)
      {
         if (a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId)
         {
            oldOwnerIds.put(a.Id, Trigger.oldMap.get(a.Id).OwnerId);
            newOwnerIds.put(a.Id, a.OwnerId);
            accountIds.add(a.Id);
         }
      }
        if (!accountIds.isEmpty()) {
         for (Account acc : [SELECT Id, (SELECT Id, OwnerId FROM Contacts) FROM Account WHERE Id in :accountIds])
            {
            String newOwnerId = newOwnerIds.get(act.Id);
            String oldOwnerId = oldOwnerIds.get(act.Id);
            for (Contact c : acc.Contacts)
            {
               if (c.OwnerId == oldOwnerId)
               {
               Contact updatedContact = new Contact(Id = c.Id, OwnerId = newOwnerId);
               contactUpdates.add(updatedContact);
               }
            }
            }
       }
            update contactUpdates;
}
With a final comment of:

I was able to figure out the solution.My trigger was skipping the if condition.

If(c.owner.Id ==oldOwnerid)

Soo changed that ...It works fine now...
Apologies for asking something that is probably simple but I'm yet to plod off on my Apex courses!
Hi All,

I want to integrate with Facebook from Salesforce. I am able to create post on wall by using graph api of Facebook. but i want to send/Recieve  private message by using apex.I have used Javescript FB.ui{} method to send message.but using FB.ui user need to login to the popup window. Is there is any other way to send message by using rest api.
Please let me know it is urgent.

Please let me know end point and parameters requied to send private message.

Thanks
Khillan Singh
I have a publisher action of type "custom visualforce".

I am using Sfdc.canvas.publisher.subscribe method to know when the "submit" button on publisher is clicked.
I also want to know when the "cancel" button on the publisher is clicked.

I have below script in my VF page,

<script type='text/javascript'>
            Sfdc.canvas.publisher.subscribe({name: "publisher.post", onData:function(e) {
              
                console.log("Submit clicked");
             }});

            Sfdc.canvas.publisher.subscribe({name: "publisher.close", onData:function(e) {
             
                console.log("Cancel clicked");
             }});                                         
     </script>

When I click the submit button, I see successful log - "Submit Clicked"
But when I click the Cancel button nothing is logged.

Any idea how can I do this ?
There doesn't seem to be any documentation on different events that you can subscribe to.

Hi,

I want to create record of quota,and want to show records of quota that user of particular profile own.I have enable the forecast object and check the 'show quota' check box to true.I have implement the function, but i do not know whether is write or wrong.

when user click on forecast tab is show forcast value that we set in forecast setting like quarters or months.and show the records of opportunity.
i show only those opportunity that that user has created but not show other user's created opportunity.

Please let me know whether this functionality is right or not. please suggest me some solution

Thanks

Hi Jeff,

Need your help .

I have written a  test class where i was unable to cover the code coverage for the Inner class.

I have a class which have 2 class in one class . when i have  written a test class i was unablk to cover the code coverage 1 class.

This is my controller :

global class JobSearch
{
    public String searchemail {get;set;}
    public string persearch{get;set;}
    public string jobDesc{get;set;}
    public List<Job__c> objJob{get;set;}
    public Job__c newjob{get;set;} 
    public List<List<Sobject>> objJobList{get;set;} 
    public JobSearch(ApexPages.StandardController controller)
    {
    List<Job__c> ObjJob= new List<Job__c>();
   
    List<List<Sobject>> objJobList = new List<List<Job__c>>(); 
     newjob = new Job__c();
    objJob=[Select Job_ID__c,Id,Name,Account__r.Name,CCL_Job_Type__c,Post_Date__c,Industry__c,Job_Category__c,Career_Level__c,AR_Salary__c,AR_Job_Details__c,AR_Job_Application_Link__c from Job__c where Name like :searchemail limit 1];

    //objJobList = [FIND 'Name' IN ALL FIELDS RETURNING Job__c(Id,Name,Account__c,Industry__c,Job_Category__c,Career_Level__c)];
    }
  public PageReference search()
    {
     try
       {
   
    persearch = '%'+searchemail+'%';
   // objJob=[Select Id,Name,Account__c,CCL_Job_Type__c,Post_Date__c,Industry__c,Job_Category__c,Career_Level__c,AR_Salary__c,AR_Job_Details__c from Job__c where Name like :persearch or Industry__c like :persearch or Account__r.Name like :persearch or CCL_Job_Type__c like :persearch or Job_Category__c like :persearch limit 10000];
    objJob=[Select Description__c,Job_ID__c,Id,Name,Account__r.Name,CCL_Job_Type__c,Post_Date__c,Industry__c,Job_Category__c,Career_Level__c,AR_Salary__c,AR_Job_Details__c,AR_Job_Application_Link__c from Job__c where Name like :persearch or Industry__c like :persearch or Account__r.Name like :persearch or FSS_CCL__c like :persearch or Location__c like :persearch limit 10000];

     objJobList = [FIND 'Name'  IN ALL FIELDS RETURNING Job__c(Id,Name,Account__c,Industry__c,Job_Category__c,Career_Level__c)];   
   
   
    }
    catch(Exception ex){
          System.debug('\n\nException ='+ex.getMessage()+'\n\n');
          searchemail ='';

    

     }
    return null;
    }
   
   public String searchedRecordId { get; set; }
    public static list<ResultSet> searchedRecord {get;set;}   
    @RemoteAction
    global static ResultSet[] getRecords(String searchText) {
        //sObject List
        searchedRecord = new list<ResultSet>();
        //SOSL Text should be more then one charecter
        if(searchText.length() >0){
            //SOSL opretion to retrive records of the Account, Lead, Contact, Opportunity, Lead Objects you can add more.
            List<List<SObject>> searchList = [FIND :searchText IN ALL FIELDS RETURNING Job__c(Id,Name,Industry__c)];
            //Adding diffrent object's records in sobject list
            for(List<SObject> o:searchList){
                for(SObject s:o){
                    searchedRecord.add(new JobSearch.ResultSet(s));
                }
            }
        }

        return searchedRecord;
    }

      global class ResultSet{
        public String Id {get;set;}
        public String Name{get;set;}
        //public String Level__c{get;set;}
      // public String Description {get;set;}
       // public String sObjectName {get;set;}
        public ResultSet(sObject s){
            this.Id = s.Id;
            this.Name = s.get('Name')+'';
          //  this.Level__c=s.get('City__c')+'';
          //  this.Description = s.get('Description')+'';
            //this.sObjectName = getsObjectNameById(Id);           
        }      
        global ResultSet(String Id,String Name){
            this.Id = Id;
            this.Name = Name;
           //this.Level__c=City__c;
            //this.Description = Description;
            //this.Description__c= Description__c;
            //this.sObjectName = getsObjectNameById(Id);           
        }
 
    }   
   
           }


Test class

@isTest(SeeAllData=true)
private class TestJobSearch
{        
private static testMethod void TestJobSearch()
      {
         contact con=new contact(Lastname='A',Email='ryeturi@deloitte.com',FirstName='Srikanth',Phone='9620566619');
         insert con;
         List<Job__c> objJob = new List<Job__c>();
        objJob=[Select Job_ID__c,Id,Name,Account__r.Name,CCL_Job_Type__c,Post_Date__c,Industry__c,Job_Category__c,Career_Level__c,AR_Salary__c,AR_Job_Details__c,AR_Job_Application_Link__c from Job__c limit 1];
   
      Asset assetObj = new Asset(Name = 'Test Asset');
      insert assetObj;
   
       ApexPages.StandardController sc = new ApexPages.StandardController(con);   
       JobSearch createCon = new JobSearch(sc);
             
       PageReference pageRef = Page.jobsearchrepeat;
       Test.setCurrentPage(pageRef);
                 
                   createCon.search();
    }
       }

The Class is fine worked for the Upper class ,but i cannot able to call the 2nd class which is in Bold letters.........
My code coverage is 47% only , can anyone help me out from this so that i can cover min 75% code coverage to move it to production
I have a custom button on list view where i want to select multiple records through checkbox and get their ids in apex class but there is no visualforce page. I have created a list button where i have used javascript to call that class. how to pass record ids to that class.

Please advise
  • March 13, 2014
  • Like
  • 0
it has to print :

csedeep7@gmail.com
<apex:outputField value="{!contact1.email}"/>
it is printing like this :

csedeep7@gmail.com [ Gmail]
can i know what is the issue
Hi ,

I need to integrate of beanstream with salesforce. i have create sanbox of beanstream. Can some once let me know the apex code  for intregation with beansstream

Thanks
Khillan Singh
hi,
i hav a custom object,i want to insert only single value.when i insert new data in to object,its delete old data.

i hav tried the following trigger

trigger DeleteRecord on SampleTest__c (after insert)
{
SampleTest__c[] accs=new List<SampleTest__c>();

for(SampleTest__c acc:trigger.old)
{
accs.add(acc);
 
}
delete accs;

}
Hi,
Is it possible to stop the execution of the flow in apex classes / triggers so that I could put a breakpoint in the apex class and when I hit the breakpoint in the class it would stop the execution and I could step thru the code in the Eclipse IDE and inspect the variables ?
This is a very good way of learning how the code works and which code is executed in different scenarios.
This is possible in non-cloud normal app development with Java
I know that it is possible to set debug log statements in the code and then run thru the code and it would print the result but this is not nearly as easy as stepping thru the code.
Thanks, Jani
  • January 14, 2014
  • Like
  • 4

Unable to get hyperlink in add.error code, In trigger.

 

I have seen codes in forum, but wrkg out, as its giving like output text, i need in clickable format.

 

i tried this:

o.addError('ERROR TRM100: There is already an identical record: <a href=\'https://cs2.salesforce.com/' + Acctid.id + '\'>Record Number ' + Acctid.id + '</a>');

 

  • March 14, 2013
  • Like
  • 0

Hi

 

I have changed the datatype Long Text Area into Rich text.some visualforce page is there based on this field, and that VF page  is not working when i changed Long text area into Rich text, it is throwing an error "Rerender is not supported" , then i have removed the rerender from the command button, but that redender is doing some functionality. is there any other way to achive rerender functionality, I am posting the code also, please take a look at it.

 

<apex:form id="form">
        <apex:outputPanel layout="none" rendered="{!readPermissions}">
            <apex:pageBlock id="pageBlock">
           
                <apex:actionStatus id="AjaxStatus" onstart="DisableButton()" onstop="EnableButton()">
                </apex:actionStatus>
               
                <script>
                   
                    var previousOnload = window.onload;       
                    window.onload = function() {
                        if (previousOnload) {
                            previousOnload();
                        }
                        document.getElementById('divLoading').style.visibility = 'hidden';
                    }
                   
                    function DisableButton() {
                        document.getElementById('divLoading').style.visibility = 'visible';
                        document.getElementById("{!$Component.form.pageBlock.buttons.saveButton}").disabled=true;
                    }
                   
                    function EnableButton() {
                        document.getElementById('{!$Component.form.pageBlock.buttons.saveButton}').disabled=false;
                        document.getElementById('divLoading').style.visibility = 'hidden';
                    }
                   
                </script>
<apex:pageBlockButtons id="buttons" location="top">
                    <apex:commandButton action="{!step3}" value="{!$Label.Previous_Button_Label}" id="previousButton" />
                    <apex:commandButton action="{!save}" value="{!$Label.Save_Button_Label}" id="saveButton" status="AjaxStatus" rerender="form"/>
                    <apex:commandLink action="{!cancel}" value="{!$Label.Cancel_Button_Label}" id="cancelButton" />
                </apex:pageBlockButtons>

and the notes code is

<apex:outputPanel id="notesContainer">
                    <table >
                        <thead>
                            <tr>
                                <th><apex:outputText value="{!$ObjectType.Agreement__c.fields.Notes__c.label}" id="esaNotesLabel"/></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                               <td ><apex:inputTextArea richtext="True" styleClass="tableTextArea" value="{!Agreement__c.Notes__c}" id="esaNotes"/></td>
   
                                </tr>
                        </tbody>
                    </table>
                </apex:outputPanel>

  • February 08, 2012
  • Like
  • 0

Hi, if you open a standard page there is a related list called notes & attachments.

I want to show it on a visualforce page and cannot find out how anywhere in the documentation. 

I am a very new developer learning as I go. Could someone please help.

Sorry it is probably very easy but so much documentation and over 2hrs searching with no results!!

 

Thanks

 

Steve

Hello guys,

 

Need some help with the Command Link. I know there's no attribute as "Disable" for <apex:commandLink >, like we do have for <apex:commandButton> . But as per the requirement, i want to have the link disabled for a particular profile. Can this be achived??

 

All your replies are highly appreciated.

 

Thanks

Krugger

Is there a way to check if the current running user has permission to access a specific visualforce page?