• Arijit_r
  • NEWBIE
  • 55 Points
  • Member since 2009

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies

Hi all,

 

What is appexchange? How can I host my application on appexchange?

 

 

Thanks for u r help....

Salesforce introduced allowing you to assign multiple users to tasks via roles/groups etc. Is there a way to do this via Apex as I can't find anything in the spec about it...

 

  • January 04, 2012
  • Like
  • 0

HI,

I wanna display the name of the browser which i am using

and this has to come from the controller

Could anyone help me the sample code

 

ThankYou

Hi,

I have a static method as given below im tryong to writte a test class for this it shows error

please any one give some idea to solve this problem

 

public class controller
{
public static SPQ__c product { get; set; }
public String productname { get; set; }   
@RemoteAction
    global static SPQ__c getSPQPr(String productname) {
        product = [select id ,Standard_Cost__c, name from SPQ__c where name= :productname and Year__c='Mid Year 2011' limit 1];  
        return product;
    }  


@RemoteAction
    global static Test__c getType() {
        AccType = [select Accessory_Type__c , name from Test__c where id= :'a2mQ0000001MpvE' limit 1];
        return AccType;
    }  
    }

 Thanks,

Hi,

     Yes I have tried the way u have said and changed the code in this way

public pageReference SendEmail()
            {    
                     System.Debug('############Size of unselected############'+selectedNames.size());
                     Id quoteid = ApexPages.currentPage().getParameters().get('quoteid');
                     quote1 = [select id,name from Quote where id =:quoteid];
                     PageReference pdfPage = Page.convertpdf1;
                     pdfPage.getParameters().put('id',quoteid);
                     Blob pdfBlob = pdfPage.getContent();
                     Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
                     efa.setFileName('attachment.pdf');
                     efa.setBody(pdfBlob);  
                     
                     Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
                   
                     for (String obj : selectedNames)
                     {
                         contact = [select Id,name,email from Contact where name =:obj];
                        //id1 = new List<Id>();
                         for(Integer i=0; i < contact.size(); i++)
                             {
                                 email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
                                 //id1.add(contact[i].Id);
                                 email.setTargetObjectId(contact[i].Id);
                                 email.setTemplateId(e1.id);
                                 Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
                             }  
                     visible = 'show';
                     return null;
              }

The apex class is saved. But while sending mass mail there is a visualforce error

List has no rows for assignment to SObject .

 

Plz provide the exact code if possible.

Hi everyone,

 

I've been looking everywhere for an answer to this and I can't seem to find it. I would appreciate and help anyone could give me. I have a pageBlockTable on my page that displays a list of records to related to Opportunities. I want this to look as similar to a standard related list as possible. Someone else had a similar problem here. I want the table to look like this:

 



 

But currently it looks like this:

 

 

As you can see, there are a few problems. There is a border underneath the title and buttons, the button is larger than it should be, and the "No records" message doesn't display with a full border around it. In my case, there is also more space between the edge of the pageBlockTable and the pageBlock than there should be.

 

Can anyone point me in the right direction?

 

Jake McCloskey

 

 

  • January 05, 2012
  • Like
  • 0

Hi all,

 

What is appexchange? How can I host my application on appexchange?

 

 

Thanks for u r help....

Salesforce introduced allowing you to assign multiple users to tasks via roles/groups etc. Is there a way to do this via Apex as I can't find anything in the spec about it...

 

  • January 04, 2012
  • Like
  • 0

Hello,

 

I need to write a trigger where if for a particular field the value isi.e. Stage__c = 'Changed'.. no new record should get created...

 

 

My Custom object name is Acc__c

Custom Field Name is Stage__c

 

 

  • February 01, 2011
  • Like
  • 0

Greetings,

 

Been pulling out my hair on this one - have a fully functional class/trigger set that performs the following:

 

Have a "Reports To" and "Reporting VP" lookup fields on the User record.  For every Account record I want to have three AccountTeamMembers created, or updated when the Account Owner changes, or if their report to structure should change:

 

"Sales Rep" (Oppy Owner)

"Sales Manager" (Oppy Owner's Report To) and

"Sales Director" (Oppy Owner's Reporting VP)

 

Again, the trigger and class are working - I'm struggling with the Test Class.  There are three entry points:

1.  Account creation - (create the three AccountTeamMembers)

2.  Account owner change - (replace the three AccountTeamMembers)

3.  User Manager / VP change - (replace the Manager / Director AccountTeamMembers)

 

Here's the error message / Stack Trace:

 

Message:

System.DmlException: Update failed. First exception on row 0 with id 005Q0000000LTK4IAO; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): User, original object: Account: []

 

Stack Trace:

Class.TestAccountTeamMemberUpdates.testAccountModelATMAssignmentMethods: line 140, column 13 External entry point

 

I will post my test class in the next message.  Thanks for any guidance / assistance!

 

Pete