• Amit Yadav 9
  • NEWBIE
  • 45 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 8
    Replies
Hi,

I am displaying results from SOSL query in a page block table.
For salesforce knowledge articles, "where" condition for "publish status" is mandatory to be mentioned.
Public List<Testing__kav> kbList{get;set;}
List<List<sObject>> search_results = [FIND :searchStr1 IN ALL FIELDS RETURNING Knowledge__kav
                                                             (Id,Title,Summary WHERE PublishStatus = 'Online') ];  
 kbList = search_results_dr[0];
 
But This only retrieves articles with online status. 
I also need articles with Draft Status, for which i have written another sosl query: 

List<List<sObject>> search_results_draft = [FIND :searchStr1 IN ALL FIELDS RETURNING Knowledge__kav
                                                             (Id,Title,Summary WHERE PublishStatus = 'Draft') ];  

How to combine these two sosl queries and add the result to my object kbList so that i can display in VF page in one single table? 
 
 public void fun()
   {  
       list<Payment__c> pay=new list<Payment__c>();
       for(Payment__c nop:[select id,,npe01__Scheduled_Date__c, from Payment__c where Paid__c=true])
       {
           integer year=nop.npe01__Scheduled_Date__c.year();
           integer month=nop.npe01__Scheduled_Date__c.month();
         
     }

when i run this code in developer console in production it gives error:
System.NullPointerException: Attempt to de-reference a null object 
   on the highlighted part.
This is working fine in sandbox. Deployed without any problems.
Checked the query in query editor. It is returning records as expected.
What could be the problem here???
Any help is appreciated.
Thank you
<script type="text/javascript">
   function popuponclick(id)
   {
      my_window = window.open('{!$Page.popuppage}?id='+id, 'popuppage','height=340,width=350,left=315,top=180,toolbar=0, directories=0, status=0,location=no',
       "mywindow","status=1,width=350,height=150");
   }
</script>


i m using this script to call a pop up on my vf page. but the top-margin of the pop up is fixed so as soon as i move my mouse away from the link, pop up closes but i need to click a button on the pop up, is there any way i can set the margin dynamic according to the top-margin of the record itself.

Thank you
i need to create a custom mini page layout or vf page which has a pin option
 and This means allow the hover to be pinned to the page so it can be reviewed on home page.

Thank you in advance
Amit Yadav
 
hi,

i am having problem in converting a lead to a person account  with company field not null. it is automatically converted to a buisness account.
Is it possible to convert a lead to a person account even when there is data in  company field???

Any Ideas?

Thanks
really appreciate it.
hi,

i need to order Tasks with a High priority  display first in red font than sort by Due Date with the oldest due date first.

any help will be much appreciated. thank you
 A developer need to perform an automated extract of data from Salesforce nightly at 2:00 a.m.
How would the developer accomplish this?
a. Use the Export Scheduler of the Data Loader’s GUI
b. Use the Command-line interface of the Data Loader
c. Use the Data Export service to perform a nightly extract
d. Use the Schedule Manager of the import wizard


why we can only use command-line interface  of the data loader in this question? Why not any others???
1. Create a custom tab naming, “Assignment”
2. Clicking on Assignment, it will open a VF page(showingbelow)
3. Click on Account Lookup - . It will open a lookup window, select the Account.
4. Account will appear in the following box
Account Name :
 SUBMIT            Total Contacts: 4


5. Click on Submit, will display the contact list related to theaccount
6. User can edit any of the Contact. Clicking on edit, will redirect to Contact page editand save.
7. User can delete the contact.
8. Total Contacts should show the total number of contacts in the selected Account


account name is lookup field to choose a account and submit is a button which when clicked gives the details of contacts related to the selected account.

thank you
please help
i m trying to use a controller on a custom object. Class is compiling fine but my VF page is showing an error as "Unknown property 'MyController.Position__c'"
This is my class
public class MyController 
{
    private final Position__c p {get;set;}
    public MyController() 
    {
        p = [SELECT Id, Name FROM Position__c
                   WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
    }
    
    public PageReference save() 
    {
        update p;
        return null;
     }
}


And this is my VF page

<apex:page controller="MyController" tabStyle="Position__c">
    <apex:form >
        <apex:pageBlock title="Congratulations {!$User.FirstName}">
            You belong to position Name: <apex:inputField value="{!Position__c.Name}"/>
            <apex:commandButton action="{!save}" value="save"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>




Thanks!!
hi all

i m trying to print the results of a soql query that uses joins using system.debug but it showing erro.
i think i dont know the right syntax.
somebody pleasse help me out.


thank you :)
Hi,

I am displaying results from SOSL query in a page block table.
For salesforce knowledge articles, "where" condition for "publish status" is mandatory to be mentioned.
Public List<Testing__kav> kbList{get;set;}
List<List<sObject>> search_results = [FIND :searchStr1 IN ALL FIELDS RETURNING Knowledge__kav
                                                             (Id,Title,Summary WHERE PublishStatus = 'Online') ];  
 kbList = search_results_dr[0];
 
But This only retrieves articles with online status. 
I also need articles with Draft Status, for which i have written another sosl query: 

List<List<sObject>> search_results_draft = [FIND :searchStr1 IN ALL FIELDS RETURNING Knowledge__kav
                                                             (Id,Title,Summary WHERE PublishStatus = 'Draft') ];  

How to combine these two sosl queries and add the result to my object kbList so that i can display in VF page in one single table? 
 
hi,

i need to order Tasks with a High priority  display first in red font than sort by Due Date with the oldest due date first.

any help will be much appreciated. thank you
hi all

i m trying to print the results of a soql query that uses joins using system.debug but it showing erro.
i think i dont know the right syntax.
somebody pleasse help me out.


thank you :)
 mail.setReferences('References: 1*<'+String.valueOf(b2bcid)+'> CRLF');

Hello guys,

 

if I'm using this in my outbound messages class I'm getting error as

 

System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_MESSAGE_ID_REFERENCE, References header is not valid.: []
Class.WPOSP.B2BRespondtoinquirycontroller.sendResponse: line 59, column 5 External entry point 

 

in the above code String.valueOf(b2bcid) is my record id. I was wondering what will be the syntax of mail.setReferenes method.

 

I also looked at http://tools.ietf.org/html/rfc2822#section-3.6.4 but couldn't understand the syntax.

 

Could you please help me in this.

 

Thanks,

Vamsii

  • July 09, 2011
  • Like
  • 0

Ive been trying a million different ways to create a popup bubble when a user mouses over a link to show a customized VF page for contact info + other objects.   Because it needs to include so much on the mouseover, the standard mini page layout doesnt work. I tried learning some JQuery to do this and I can get a popup to appear, but when I try to  link in a page, it crashes out.  It says it cant find some .js files and refuses to load the page along with the header getting messed up on the page.  Is there a simple way to do this that I'm missing?

 

Any direction would be greately appreciated!

The requirement is

 

  1. Send notification emails to a particular email address whenever there is an email activity in a case. The notification should contain the email body.
  2. The notification emails should contain the attachments that were part of the email that triggered the notification.
  3. The notification emails of case should form a conversation thread in gmail (the specified email address is gmail)

 

I am able to complete the first 2 requirements, but the 3rd one is causing troubles. It works partially though. With all that I have heard Gmail uses the Subject line to group emails into a conversation thread. I have a constant Subject but still the notification emails create new conversation threads for each new day.

 

Example

Day 1 – there are 8 email activities in the case 1 and there are 2 email activities in case 2. The apex code sends 8 notifications related to case 1 that form a conversation thread and 2 notifications for case 2 that form another conversation thread. (this is correct)

Day 2 – there are 3 email activities in case 1 and there are 4 email activities in case 2. The apex code sends 3 notifications related to case 1 but this forms a new conversation thread and is not part of the same conversation thread created on day 1.

 

How can I form a single thread for each case instead of single thread of each case on each day?

 

I tried using the setInReplyTo and setReferences but got errors and the notification was not sent. Will this help in the threading problem, what are the other options?

 

Thanks

KD