• Michael Sypro
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies
I created a custom object called Expense.  I'm trying to allow users to upload a photo from their mobile device to the Files object attached to it.  However, on the mobile app I can't get the button to display.  It shows correctly on the web.User-added image
User-added image
Here's the page layout:
User-added image
Shouldn't adding the File action add the button to the mobile app?  What am I missing?

Thanks!
I think this is a pretty basic question, but it's beating me right now.  I have a list of leads in a pageBlockTable with an inputField for the user to set a new value for the field Follow_up_Date__c.

Visualforce:
<apex:inputField id="txtFDate" value="{!cc.Follow_up_Date__c}" />
<apex:commandLink value="Update" action="{!saveFollowUp}" rerender="leadBlock" >
     <apex:param name="leadId" value="{!cc.Id}" />
</apex:commandLink>
Apex:
public PageReference saveFollowUp(){  
     string leadId=ApexPages.currentPage().getParameters().get('leadId');
     date fDateToUse=?????;

     if (leadId!=null) {
		Lead leadToUse = [select id from lead where id=:leadId limit 1];
	    	leadToUse.Follow_up_Date__c=fDateToUse;
	    	update leadToUse;
     }
     return null;
}

I need help at the question mark line.  How do I get the value from the inputField and save the lead? 

Thanks

Hello All,

I've been having trouble trying to write a test method for this class... I'm not sure if it's because I'm using querystring parameters or what, but any help would be appreciated.

 

public with sharing class msaOppExtension {
  public String locToSet {get;set;}
  public String statusToSet {get;set;}
  public Opportunity o;
  
  public msaOppExtension(ApexPages.StandardController ctr) {
    o = [SELECT MSA_Location__c, MSA_Location_Date__c, MSA_Returned__c, MSA_PO__c, MSA_Deposit__c FROM Opportunity WHERE Id=:ctr.getRecord().Id];
  }
   
  public PageReference updateLoc() {
    
    o.MSA_Location__c = locToSet;
    o.MSA_Location_Date__c=System.Now();
    string f = ApexPages.currentPage().getParameters().get('from');
    if (f =='Releases' && locToSet=='Releases'){
    	o.MSA_Returned__c=true;
    }
    else {
    	o.MSA_Returned__c=false;
    }
    update o;
    return null;
  }
  
  public PageReference updateStatus() {
    o.MSA_Status__c = statusToSet;
    update o;
    return null;
  }
  
  public PageReference updateCancel() {
    o.MSA_Location__c = 'Archive';
    o.MSA_Location_Date__c=System.Now();
    o.StageName='Closed Lost';
    o.Reason__c='Duplicate';
    o.Lost_To_Competitor__c='Other';
    update o;
return null;
  }
  
  public PageReference createNew(){
  		string oppId=ApexPages.currentPage().getParameters().get('id');
  		
	  	o.MSA_Location__c = 'Processing';
	    o.MSA_Location_Date__c=System.Now();
	    o.MSA_PO__c='Not Started';
	    o.MSA_Deposit__c='Not Started';
	    update o;
  	
    	List<MSA__c> rows = new List<MSA__c>();
  		rows.add(new MSA__c(Opportunity__c=oppId, RecordTypeId='01270000000UJ4M'));//Invoice

		insert rows;
		
		String newPageUrl = '/apex/MSA_Processing?l=Processing&ddl=VA';
  		PageReference newPage = new PageReference(newPageUrl);
  		newPage.setRedirect(true);
  		return newPage;
    }
    }
}

 

 

 

 

 

I need to attach documents to opportunities, but I also need to define those documents with a name and type (product quote, fabric sample, etc...).  I don't think I can use the standard Notes and Attachments object because I can't add a type field.  Can I create my own custom object similar to this that will upload a file and can be attached to an opportunity?  I tried to use Content, but I can't create a New button from the opportunity.  I also can't ensure they don't save it to their own personal workspace (therefore bypassing the required field on the page layout).
Any help at all is appreciated (even pointing to a good appexchange app).
Thanks!

 

I need to attach documents to opportunities, but I also need to define those documents with a name and type (product quote, fabric sample, etc...).  I don't think I can use the standard Notes and Attachments object because I can't add a type field.  Can I create my own custom object similar to this that will upload a file and can be attached to an opportunity?  I tried to use Content, but I can't create a New button from the opportunity.  I also can't ensure they don't save it to their own personal workspace (therefore bypassing the required Opportunity field on the page layout).

 

Any help at all is appreciated (even pointing to a good appexchange app).

 

Thanks!

I'm creating a visualforce page that lists every member of our sales team and all of their open tasks.  Each user's data should be separated by their own pageBlock.  

 

However, the system I have requires me to create a new method for every user.  Code below:

 

<apex:pageBlock title="Michael Holley">

<apex:dataTable value="{!MichaelHolley}" var="t" width="965" cellpadding="2">

<apex:column headerValue="Subject">{!t.Subject}</apex:column>

</apex:dataTable>

</apex:pageBlock>

 

<apex:pageBlock title="Elizabeth Drimm">

<apex:dataTable value="{!ElizabethDrimm}" var="t" width="965" cellpadding="2">

<apex:column headerValue="Subject">{!t.Subject}</apex:column>

</apex:dataTable>

</apex:pageBlock>

 

public List<Task> getMichaelHolley() {

return [select subject from task where owner.firstname='Michael' and owner.lastname='Holley' and status<>'Complete'];

}

public List<Task> getElizabethDrimm() {

return [select subject from task where owner.firstname='Elizabeth' and owner.lastname='Drimm' and status<>'Complete'];

}

 

 

Is there any way I can specify a generic getTasks() method and pass a different variable to it based on the dataTable's ID or something similiar?  That way I only need one method?  I don't think url parameters or inputText fields will work although I could be wrong...

 

Any help at all is appreciated

 

Thanks 

 

 

 

Message Edited by Michael Sypro on 06-16-2009 01:20 PM
Message Edited by Michael Sypro on 06-16-2009 01:21 PM
I need to display some views on the home tab for certain users.  What is the best way to do that?  Should I try visualforce, or s-controls, etc...?  The views are simple like Open Cases and such.  I tried the example listed here, but if you click to edit the row it opens inside the iframe....there's also no styling.  Any help at all would be appreciated.
I created a custom object called Expense.  I'm trying to allow users to upload a photo from their mobile device to the Files object attached to it.  However, on the mobile app I can't get the button to display.  It shows correctly on the web.User-added image
User-added image
Here's the page layout:
User-added image
Shouldn't adding the File action add the button to the mobile app?  What am I missing?

Thanks!
I think this is a pretty basic question, but it's beating me right now.  I have a list of leads in a pageBlockTable with an inputField for the user to set a new value for the field Follow_up_Date__c.

Visualforce:
<apex:inputField id="txtFDate" value="{!cc.Follow_up_Date__c}" />
<apex:commandLink value="Update" action="{!saveFollowUp}" rerender="leadBlock" >
     <apex:param name="leadId" value="{!cc.Id}" />
</apex:commandLink>
Apex:
public PageReference saveFollowUp(){  
     string leadId=ApexPages.currentPage().getParameters().get('leadId');
     date fDateToUse=?????;

     if (leadId!=null) {
		Lead leadToUse = [select id from lead where id=:leadId limit 1];
	    	leadToUse.Follow_up_Date__c=fDateToUse;
	    	update leadToUse;
     }
     return null;
}

I need help at the question mark line.  How do I get the value from the inputField and save the lead? 

Thanks

I'm creating a visualforce page that lists every member of our sales team and all of their open tasks.  Each user's data should be separated by their own pageBlock.  

 

However, the system I have requires me to create a new method for every user.  Code below:

 

<apex:pageBlock title="Michael Holley">

<apex:dataTable value="{!MichaelHolley}" var="t" width="965" cellpadding="2">

<apex:column headerValue="Subject">{!t.Subject}</apex:column>

</apex:dataTable>

</apex:pageBlock>

 

<apex:pageBlock title="Elizabeth Drimm">

<apex:dataTable value="{!ElizabethDrimm}" var="t" width="965" cellpadding="2">

<apex:column headerValue="Subject">{!t.Subject}</apex:column>

</apex:dataTable>

</apex:pageBlock>

 

public List<Task> getMichaelHolley() {

return [select subject from task where owner.firstname='Michael' and owner.lastname='Holley' and status<>'Complete'];

}

public List<Task> getElizabethDrimm() {

return [select subject from task where owner.firstname='Elizabeth' and owner.lastname='Drimm' and status<>'Complete'];

}

 

 

Is there any way I can specify a generic getTasks() method and pass a different variable to it based on the dataTable's ID or something similiar?  That way I only need one method?  I don't think url parameters or inputText fields will work although I could be wrong...

 

Any help at all is appreciated

 

Thanks 

 

 

 

Message Edited by Michael Sypro on 06-16-2009 01:20 PM
Message Edited by Michael Sypro on 06-16-2009 01:21 PM