-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
6Questions
-
6Replies
Upload File button not showing on mobile app
Here's the page layout:
Shouldn't adding the File action add the button to the mobile app? What am I missing?
Thanks!
-
- Michael Sypro
- October 25, 2018
- Like
- 0
- Continue reading or reply
retrieve value of inputField
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
-
- Michael Sypro
- September 26, 2014
- Like
- 0
- Continue reading or reply
Test method issues
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; } } }
-
- Michael Sypro
- June 20, 2012
- Like
- 0
- Continue reading or reply
Attachments
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!
-
- Michael Sypro
- June 10, 2010
- Like
- 0
- Continue reading or reply
Pass a variable to a controller that is not a querystring
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
-
- Michael Sypro
- June 16, 2009
- Like
- 0
- Continue reading or reply
Display views on Home tab- Best practices
-
- Michael Sypro
- September 26, 2008
- Like
- 0
- Continue reading or reply
Upload File button not showing on mobile app
Here's the page layout:
Shouldn't adding the File action add the button to the mobile app? What am I missing?
Thanks!
- Michael Sypro
- October 25, 2018
- Like
- 0
- Continue reading or reply
retrieve value of inputField
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
- Michael Sypro
- September 26, 2014
- Like
- 0
- Continue reading or reply
Pass a variable to a controller that is not a querystring
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
- Michael Sypro
- June 16, 2009
- Like
- 0
- Continue reading or reply