• shankswi
  • NEWBIE
  • 10 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 7
    Replies
I'm a new admin trying to get my feel wet writing workflow formulas. I'm not sure if this is what I need or if I'll need a trigger instead. I'd like a checkbox to update on the Contact record when someone becomes attached to a Campaign with a certain record type (i.e. a Campaign Member record is created or deleted). Any suggestions would be incredibly helpful! 
Hi,

I'm trying to create a visualforce page which filters the standard Opportunity record type selection page based on the related Account record type. I'm getting this error upon saving my VF:

Error: Unknown property 'AccountStandardController.recTypeID'

Here's my code:

VF:
<apex:page standardController="Account">
    <apex:form >
            <apex:selectList value="{!recTypeID}" size="1">
                <apex:selectOptions value="{!myOptions}"></apex:selectOptions>
            </apex:selectList>         
    <apex:commandButton value="Next" Action="{!continue}"/>
    </apex:form>
</apex:page>


Controller:

public class myController {

        public List<SelectOption> opts             {get;set;}
        private String oType                        {get;set;}
        public Id recTypeId                         {get;set;}

        myController(){
            oType = 'Opportunity';
        }

        public List<SelectOption> myOptions() {
            opts = new List<SelectOption>();

            opts.add(new SelectOption('','--Please Select Record Type --'));

            for(RecordType rts : [Select Id, DeveloperName, Name From RecordType Where SObjectType = 'Opportunity']) {
            opts.add(new SelectOption(rts.id,rts.name));
            }

                Map<String,List<String>> mapping = new Map<String,List<String>>();
                mapping.put('Small_Medium_Sized_Business', new List<String>{'Defined_Benefit_Retirement','Defined_Contribution_Retirement'});


            return opts;
        }
    }



Hello,

I'm having some trouble with my VisualForce page. What I'm trying to do is create a table that shows relevant objects and a button next to each object. When the user clicks the button, it should change to the next page and pass the Id of the object along.

Here's what I have so far...
<apex:page Controller="ReceiveInventory" showHeader="false" sidebar="false" title="Select Lot">
<div style="zoom:300%;">

<script>
    function confirmCancel() {
        var isCancel = confirm("Are you sure you wish to cancel?");
        if (isCancel) return true;  
        
        return false;
    }  
</script>

<apex:form id="all">
<apex:outputText >Please select the lot you have scanned.<br /><br /></apex:outputText>
<apex:pageBlock >
<apex:pageBlockSection title="Lots" id="LotsTable" columns="1">
<apex:pageBlockTable value="{!lots}" var="lot">
<apex:column >
    <apex:commandButton action="{!step3}" value="Choose Lot" rerender="all">
            <apex:param name="chosenLotParam" value="{!lot.Id}" assignTo="{!chosenLot}" />
    </apex:commandButton>
</apex:column>
<apex:column value="{!lot.Name}" />
<apex:column value="{!lot.Quantity__c}" />
<apex:column value="{!lot.Date_Ordered__c}" />
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:commandButton action="{!cancel}" value="Cancel" onclick="return confirmCancel()" immediate="true" />
</apex:form>

</div>
</apex:page>

Relevant Apex code from ReceiveInventory class:
public with sharing class ReceiveInventory {

	public String chosenLot {get;set;}
	
	public PageReference step3 () {		
		system.debug('Chosen Lot: ' + chosenLot);
		PageReference pageref3 = Page.ReceiveInventory3;
		pageref3.getParameters().put('chosenLot',chosenLot);
		return pageref3;
	}
}


I've got the page displaying the objects and the buttons fine, however, it doesn't do what expected. When I click a button, nothing seems to happen; however, looking at the debug log, I see the debug line from above ("Chosen Lot: xxxxxx"). When I click the button again, I get an error page saying "The page you submitted was invalid for your session. Please click Save again to confirm your change.".

I was trying to model my code a little bit after this link (http://bobbuzzard.blogspot.com/2011/07/passing-parameters-to-apex-method-from.html).

If anyone could chip in and suggest how I can fix this issue, it would be much appreciated.

Thanks in advance!
In the custom webservice response, the tags are sorted alphabetically by salesforce automatically. Is there any way to control order of the tags in the custom webservice response?

More Details:
This is for Inbound service from another system to Salesforce. For this, we have writted a custom webservice in which the response tags are as below.

HEADER
PAYLOD
MESSAGE

In the response XML generated from salesforce, the above tags are rearranged as below.

HEADER
MESSAGE
PAYLOAD

which is causing the problem in the source system to process the response.

Is there anyway in salesforce to control the order/sequence of the tags in the response XML generated by Salesforce in the custom webservice.
HI,
i have created a custom field in account object called Prevoius Fiscal Year Revenue.
This field needs to be created and should allow for population via batch apex that can be run when the year ends.  Button to start batch should be available on the account Detail page.

Can some body give suggestion on how to create a button to achieve functinality.

Thanks in advance
Hello All,

I have a strange requirement! I need a clarification, that can we run Batch Classes or Schedule apex jobs through SQL Scripts (From SQL Server)??
If so, Could anyone please share the step-to-step procedures to do so?

Thanks in advance!

- Rajesh.
Hi,
I have been suffering with lack of logic from last couple of days.
i want to write a trigger on account object custom field which will calculate revenue for current fiscal yearYTD based on oppotunity amount.
once the current fiscal yearYTD gets changed again calculations start from next fiscal yearYTD.(that mean whatever value stored for last current fiscal yearYTD need to be override with urrent fiscal yearYTD)
Can somebody help me in figure out the best approach to get current fiscalYTD.
I hope i'm clear with my question.

Thanks in Advance

Thanks&Regards
Lakshman