• Achilles21
  • NEWBIE
  • 50 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 39
    Replies

Hi Everyone,

I have partner portal enabled in my org and we have a standard Search functionality as well. Even though it works fine and returns results, whenever I click on these results, instead of getting redirected to the item - I am getting an Error Page - Aurthorization Required.

Any inputs?

Thank you

Hi Everyone,

I have partner portal enabled in my org and we have a standard Search functionality as well. Even though it works fine and returns results, whenever I click on these results, instead of getting redirected to the item - I am getting an Error Page - Aurthorization Required.

Any inputs?

Thank you

Hi,

 

I have a custom report which is based on 3 objects. I am not being able to see the DATA in the Portal. I am being able to see the data in the CRM. Obviously, the CRM and the Portal have different users. When I say DATA is not visible, I litreally mean the DATA as I am being able to see the headers and everything.

 

Obj 1 - OWD is Public Read/Write and Profile has Read Settings

Obj 2 - OWD is Public Read - Extended using Permission Sets

Obj 3 - OWD is Public Read - Extended using Permission Sets

 

I tried almost everything. Can anyone help with this?

 

Thanks in advance!

Regards,
Achilles
Certified Developer

Hi,

 

I have a custom report which is based on 3 objects. I am not being able to see the DATA in the Portal. I am being able to see the data in the CRM. Obviously, the CRM and the Portal have different users. When I say DATA is not visible, I litreally mean the DATA as I am being able to see the headers and everything.

 

Obj 1 - OWD is Public Read/Write and Profile has Read Settings

Obj 2 - OWD is Public Read - Extended using Permission Sets

Obj 3 - OWD is Public Read - Extended using Permission Sets

 

I tried almost everything. Can anyone help with this?

 

Thanks in advance!

Do we have to do anything before being able to send Auto Generated Emails from Partner Portal?

 

I have written a trigger which will send auto generated Email upon modification of a field.

It works fine with CRM but when I am using it via portal...Emails are not showing up. Any help?

Hi All,

 

I have a trigger ( After Update). I want to write a test class for it. The idea is to send an Email to the concerned person upon modification of a note. Here Note is a lookup with Account. And an Account will have a contact. The email address is of the contact.

 

Code is :

Hi All,

I am facing one of the worst test class scenarios. I have a trigger ( After Update). The code is:

Trigger sendEmail on Note__c (after update)
{

 User pu;
 List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
 
 pu= [select u.Contact.Account.Rep1__r.Name,
 
 u.Contact.Account.Rep2__r.Name,
 u.Contact.Account.Rep1__r.Email,
 u.Contact.Account.Rep2__r.Email from User u where  u.id=:UserInfo.getUserId()]; 
 
 
 String Smail= pu.Contact.Account.Rep1__r.Email;
 String Imail= pu.Contact.Account.Rep2__r.Email;

 
 system.debug('Toaddress:'+Smail);

 
 List<User> listOfUser = [Select u.Name From User u WHERE Id=:Userinfo.getUserId() limit1];
 
 List<Note__c> nt = new List<Note__c>();

 nt = [select Note1__c,Note2__c from Note__c where id IN :Trigger.New];
 
  
 for(Note__c n : nt)
 {
 
  Note__c oldNote = Trigger.oldMap.get(n.ID);
 
  snew = n.Note1__c;
  sold = oldNote.Note1__c;
  inew = n.Note2__c;
  iold = oldNote.Note2__c;
 }

 
 for(User us:listofUser)
 {
    username=us.Name;
 }

    if(sold<>snew)
	{
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
      String[] toAddresses = new String[] {Imail}; 
      mail.setSubject('Samsung Notes Modified');
      mail.setToAddresses(toAddresses);
    
      mail.setHTMLBody('The Email Body');
      Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
     
     }
     
     
     
     }
}

 

 

Can anyone please help me with the test class? I have researched enough but I am not getting any coverage!

 

Hi All,

 

I am stuck at a requirement which I am desperate to get out from. Here is what I need:

 

There is a custom object Note__c that has a look up relation with Account. A VF Page is having lookup field on it that will let the user select the Account. Now whichever Account is selected, the relatedlist NOTES should be displayed on the same VF Page. I have used a button as of now that would be required to display the notes.

 

The code is : 

<apex:page standardController="Account" extensions="AccNoteExtension">

    <apex:form >
       Please Select an Account: <apex:inputField value="{!No.Account__c}"/>
       <br/>
       <apex:commandButton action="{!DisplayNotes}" value="Display Notes" reRender="myPanel"/>
    </apex:form>
    <apex:outputPanel id="myPanel">
    <apex:relatedList subject="{!ac}" list="Notes__r" rendered="{!$ObjectType.Note__c.accessible"/>
    </apex:outputPanel>
 
 
</apex:page>
            

 

public class AccNoteExtension{ 

     public AccNoteExtension(ApexPages.StandardController controller) 
     {
       
         
     }
     public Note__c No{get;set;}
        
    
     String s,str;
     Id myId;
     List <Account> ac;
      
     public List<Account> getAC()
     {
       
     return ac;
     }
    public PageReference DisplayNotes()
     {
       ac = [select id from Account where Name = 'Kevin Test Account'];
       system.debug('AC==========='+ac);
       return null;
     }
}

 

As much as I know tha answer,

 

Just want to confirm this one.

 

Can we have different security settings for reports in a same folder?

Can a dynamic query used inside a for loop ?

 

something like this,

 

for(account a: database.query('select id,name from account where id = :myID order by '+regExp+''))

 

NOTE : I tried SOMETHING like this, it has been giving following VF Error. 

 

caused by: System.QueryException: unexpected token: '('

Hi ,

 

I've built the following extension to override new buttong for my Return Object.

<apex:page standardController="Return_Claim__c" extensions="returnExtension">

<apex:pageblock title="Return Claim Edit">

<apex:pageBlockButtons >
 <apex:form >
    <apex:commandButton value="Save" action="{!save}"/>
    <apex:commandButton value="Cancel" action="{!cancel}"/>
 </apex:form>   
</apex:pageBlockButtons>




<apex:pageBlockSection title="Return Details" collapsible="false">

    <apex:pageBlockSectionItem >
        <label><b><font face="arial" color="gray">Return Type</font></b></label> 
        <apex:form > <apex:inputField required="true" value="{!Return_Claim__c.Return_Type__c}"/> </apex:form>
    </apex:pageBlockSectionItem>
     
    <apex:pageBlockSectionItem >
         <label><b><font face="arial" color="gray">Serial Number</font></b></label>
         <apex:form > <apex:inputField required="true" value="{!Return_Claim__c.Serial_Number__c}"/> </apex:form> 
    </apex:pageBlockSectionItem>
     
   </apex:pageBlockSection>
</apex:pageblock>
</apex:page>

 The extension is :

 

public class returnExtension {

    public ApexPages.StandardController con;
    public return_claim__c retn;
    public List<return_claim__c> result;


   
   public returnExtension(ApexPages.StandardController controller) {
        
       con = controller;   
       retn=(return_claim__c)controller.getRecord();
     
    }
    
    public PageReference save()
    {
        con.save();
  //      insert retn;
        return null;
    }


    
   
}

 Everything's working okay in the VF Page.

 

PROBLEM -- when I click on the save button; a record gets created but the values in the corrosponding fields do not get inserted.

 

PLEASE HELP ME OUT. I have tried almost all the dicussions board topics similar to this. nothing's helping.

Hi,

 

How to equally space Tabs in a header ?

i.e. There should be equal space between two tabs in a VF Page Header !! 

Hi All,

 

I am trying to change the default view of the Tab. In order to achieve this I have used the following code. The problem I am facing is quite funny. 

<apex:page standardController="MyController__c" tabStyle="MyController__c" recordSetVar="Control">
   <apex:listViews type="MyController__c" >
    <apex:enhancedlist height="730" Listid="00BE00000013jRt" rendered="false"/> 
   </apex:listViews> 
</apex:page>

 I can see the related view with the mentioned ID in my CRM Development Sandbox but when I try to see the changes in the customer portal I can only see [ALL] view and not the [CURRENT CONTACTS] view that is related with the mentioned ID.

 

 

Also, I have tried to impliment the same for a different Tab and again for that tab i can see changes in CRM Dev. Sandbox but when I click on the Tab in my Portal;It is throwing some Catch !! 

 

Can anyone help ?

Hi all, I am trying to assign a LookUp field's value to tag. i.e. apex:outputLink value={!reb.Name} target="blank" Here Name is my Lookup Field. The reason why i m doing like this is i want that when I click on the link, It should open in a new page. The problem is I m not getting the VALUE of the lookup field. I am getting ID (15 DIGIT ) as the link. Can anyone please help ??

Hi ,

 

I have two different VF Pages say A and B and they are my two different sources for <Apex:iFrame> tab. ( src Attribute )

 

I have one variable <APEX:VARIABLE> and value of which is PRofile ID .

 

Based on Profile , related Iframe should be displayed on VF Page. for example, If its a system admin profile , its should be VF PAGE A and if its a standard User Profile iFrame's src attribute should be VF PAGE B.

 

I have used IF Condition to check the profile but its not working out .

Can anyone help me ?

 

 <apex:iframe src="{!If(p = "00eE0000000hlYJ","/apex/PAGE A","/apex/PAGE B")}" frameborder="0" height="449px" scrolling="no" width="100%"/>
                      

 i m not sure if this is a valid code ! PLEASE HELP ME OUT !! 

Hi All,

 

I've two Objects Products and Details. I m trying to fetch values of the fields NAME and QUANTITY from Products .. match the product name with Details and accordingly update or insert into Details !! 

 

The problem is while executing Batch Apex Job , I m not being able to insert or update records in Details Object.

Following is the code .. Please let me know if you find the mistake .. 

 

global class taskNew implements Database.Batchable<sObject>
{
global Integer quant;
global String prod;

List<Detail__C> Det = new List<Detail__C>();

global taskNew()
{
List<Product__c> Q = [SELECT Quantity__c,Name from Product__c];

for(Product__c p:Q)
{
    quant= (Integer)p.Quantity__c;
    prod = (String)p.Name;
}
}

global Database.QueryLocator start(Database.BatchableContext BC)
{
return Database.getQueryLocator([SELECT sum_of_item__c,prod_name__c from Detail__c]);
}

global void execute(Database.BatchableContext BC, List<Detail__c> scope){
    // for(integer i=0;i<2;i++){
     for(Detail__c s : scope){
     if(s.prod_name__c==prod)
     {
        s.sum_of_item__c+=quant;
        update scope;
     }
     else
     {  
     Detail__c d = new Detail__c();
     d.prod_name__c = 'Test';
     d.sum_of_item__c = quant;
     det.add(d);
     insert det; 
     }
      
     }
     }
     
global void finish(Database.BatchableContext BC){} 

}

 

Hi ,

 

The following is my  requirement . I m being unable to find a way for it . 

 

I want to have a preview of the attachment in Case object . For that I have created a Visualforce page that shows all the details of Case object and all the related lists i.e. Attachments as well. Now if I can put a button ( Preview ) for the attachment related list , and show the contain on the same VF page or it can be done by <Script> tag.

 

I am confused as any of the methos is not guaranteed to succeed . 

 

Any help on the matter would be greatly appreciated . Please let me know in case of any clearification.

Hi,

 

Can anyone tell me how to get the extension of the file being uploaded in the documents tab ?

Hi ,

 

Can anybody guide me through the following scenario.

 

I want to insert into an object on the save action of another object. For the same , I have created a trigger ( after insert ).

How can I insert the data that's getting saved to another object ?

 

Hi ,

 

I was wondering if we can add Google or Yahoo! Maps on a visualforce page & using CUSTOM CONTROLLER !!

 

All the examples I've been seeing is with STANDARD CONTOLLERS !

 

If anyone has an idea regarding this , please share .

 

 

Hi All ,

 

I am trying to create an apex trigger in which i have to manipulate some of the values that are being passed by the user on the VF page .

 

The scenario is , I've to book seats on a flight . Now the user will enter Travel Date and a flight no (unique) for object Flight__c . I am trying to fetch values for the no. of booked seats from another object Booking__c on the same date for the same flight that the user has entered . so I've written query in trigger

 

res=(List<Booking__c>)[select b.booked_seats__c from booking__c b where
               b.travel_date__c = flight.travel_date__c AND
               b.flight_no__c = flight.flight_no__c]

 

Here, as you can see I need Flight.travel_Date__c ( that is being passed by the user ) ! But im not being able to find a way .

 

FYI , My Booking and Flight have a look up relationship .

 

Please guide me thrugh this .

 

Let me know if this is perplexing or you need more info.

Hi ,

 

I am new to VF and Apex Development and creating a sample application .

My requirements are as below .

 

- have to create a simple flight booking application where the user will select Source and Destination from the picklists on the VF page .

 

- Based on the user's selection , a SOQL needs to run on Apex Controller and return results on VF page that match the criteria.

 

- I am trying getter method but It is accepting only Custom Object data type . getting various errors .

 

Question :

 

Can I be enlighten on how picklist values be sent to controller that can be used as a string , which later can be used in a where clause !!

 

 

Hi Everyone,

I have partner portal enabled in my org and we have a standard Search functionality as well. Even though it works fine and returns results, whenever I click on these results, instead of getting redirected to the item - I am getting an Error Page - Aurthorization Required.

Any inputs?

Thank you

Hi,

 

I have a custom report which is based on 3 objects. I am not being able to see the DATA in the Portal. I am being able to see the data in the CRM. Obviously, the CRM and the Portal have different users. When I say DATA is not visible, I litreally mean the DATA as I am being able to see the headers and everything.

 

Obj 1 - OWD is Public Read/Write and Profile has Read Settings

Obj 2 - OWD is Public Read - Extended using Permission Sets

Obj 3 - OWD is Public Read - Extended using Permission Sets

 

I tried almost everything. Can anyone help with this?

 

Thanks in advance!

Regards,
Achilles
Certified Developer

Hello..

 

My requirement is  to auto-populate a field from "Account" Object on "Case" Object VisualForce Page..

For eg: {"!Case.Account.bill_date__c"}

 

where bill_date__c is the field which is present only in Account Object but not in Case object.

Please help me i this case how to render the respective field.

 

 

 

Regards,

Sravika

Do we have to do anything before being able to send Auto Generated Emails from Partner Portal?

 

I have written a trigger which will send auto generated Email upon modification of a field.

It works fine with CRM but when I am using it via portal...Emails are not showing up. Any help?

Hi All,

 

I have a trigger ( After Update). I want to write a test class for it. The idea is to send an Email to the concerned person upon modification of a note. Here Note is a lookup with Account. And an Account will have a contact. The email address is of the contact.

 

Code is :

Hi All,

I am facing one of the worst test class scenarios. I have a trigger ( After Update). The code is:

Trigger sendEmail on Note__c (after update)
{

 User pu;
 List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
 
 pu= [select u.Contact.Account.Rep1__r.Name,
 
 u.Contact.Account.Rep2__r.Name,
 u.Contact.Account.Rep1__r.Email,
 u.Contact.Account.Rep2__r.Email from User u where  u.id=:UserInfo.getUserId()]; 
 
 
 String Smail= pu.Contact.Account.Rep1__r.Email;
 String Imail= pu.Contact.Account.Rep2__r.Email;

 
 system.debug('Toaddress:'+Smail);

 
 List<User> listOfUser = [Select u.Name From User u WHERE Id=:Userinfo.getUserId() limit1];
 
 List<Note__c> nt = new List<Note__c>();

 nt = [select Note1__c,Note2__c from Note__c where id IN :Trigger.New];
 
  
 for(Note__c n : nt)
 {
 
  Note__c oldNote = Trigger.oldMap.get(n.ID);
 
  snew = n.Note1__c;
  sold = oldNote.Note1__c;
  inew = n.Note2__c;
  iold = oldNote.Note2__c;
 }

 
 for(User us:listofUser)
 {
    username=us.Name;
 }

    if(sold<>snew)
	{
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
      String[] toAddresses = new String[] {Imail}; 
      mail.setSubject('Samsung Notes Modified');
      mail.setToAddresses(toAddresses);
    
      mail.setHTMLBody('The Email Body');
      Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
     
     }
     
     
     
     }
}

 

 

Can anyone please help me with the test class? I have researched enough but I am not getting any coverage!

 

Hi i am having a custom button "convert" once i click convert if the record exists it must must show that the account already exists. This convert button is similar as lead convert button.

Thanks ,

Regards,

Lavanya.

 

Hi,

 

I need to create a visual force which is reflected by the Edit Page Layout of an Object.

 

I am trying to find a solution.Help me to find a solution

 

Thanks in advance 

 

 

Hi - we want to have an easy way to view the last activity completed on a lead or opportunity and the next activity, by reading the relevant logged activity data, and taking subject, type, date etc and fill it into lead/opportunities fields, all so that management can easily see on one line in a report what has happened, and what is to happen next.

 

Has anyone done similar to this?

 

Thanks

 

James

I am working on a Customer Portal which has a 5 standard pages and a few custom pages.

When I list the pages in Develop -> Pages I only see the custom pages.

How do I get to the standard pages so I can edit them?

 

  • April 03, 2013
  • Like
  • 0

As much as I know tha answer,

 

Just want to confirm this one.

 

Can we have different security settings for reports in a same folder?

1. What is a VF Trigger?
2. How do you create a VF Trigger?

3. Usage of VLOOKUP and how to create VLOOKUP field in the object?

 

Can any one give brief description on these questions?

 

  • February 26, 2013
  • Like
  • 0

I am using a custom controller(Not extension controller) for a VF page. That VF page has a lookup to Accounts. I want the selected lookup field value in my controller. I am using actionSupport for this(On change of lookup).

 

Any help?