• prakashd
  • NEWBIE
  • 35 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies

I have an command button whose action method calls a method in my controller, the method is invoked and returns back to the commandbutton in which I have a 'onComplete=window.close();' which closes the window but the method invoked in my controller does absolutely nothing.  

 

I tried putting in broken code in that method and also tried everything I could to recieve an error message or atleast SOMETHING back from that method but I get nothing.

 

Any help would be greatly appreciated.

 

Thank's

 

 

<apex:page standardController="Speaker_Bureau_Membership_gne__c" showheader="false" sidebar="false"
extensions="em3_bureau_nomination_ctrlr">
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:form >
<!-- <apex:commandButton action="{!nominate}" value="Nominate Speakers"/>
<apex:commandButton action="{!cancel}" value="Cancel" onClick="window.top.close();"/>
<apex:actionFunction name="Nominate" action="{!nominate}" id="out"
status="myStatus" onComplete="window.close();"/>
-->
<apex:commandButton id="nominate" value="Nominate Speakers" action="{!nominate}" onComplete="alert('complete'); window.close();" />

<apex:commandButton value="Cancel" onClick="window.close();"/>
</apex:form>
</apex:pageBlockButtons>

<apex:Repeat value="{!members}" var="m">
<apex:pageBlock >
<apex:form >
<apex:facet name="header"><b>{!m.name}</b></apex:facet>
<apex:pageBlockSection title="{!m.name}" collapsible="false" columns="3">
<apex:outputField value="{!m.Bureau_Member_gne__c}" />

<apex:pageBlockSectionItem >
<apex:outputLabel value="Spaker Bureau" for="speaker_bureau"/>
<apex:selectList value="{!selected_option}" multiselect="false" size="1" id="speaker_bureau">
<apex:selectOptions value="{!Bureaus}"/>
</apex:selectList>
</apex:pageBlockSectionItem>

<apex:inputField value="{!m.Speaker_Scope_gne__c}" />
</apex:pageBlockSection>
</apex:form>
</apex:pageBlock>
</apex:Repeat>
</apex:pageBlock>
</apex:page>


apex controller method:

somes lines have been depricated that i just threw in while testing so there ignore them.

 

public void nominate(){ List<Speaker_Bureau_Membership_gne__c> nominations = new List<Speaker_Bureau_Membership_gne__c>(); for(Speaker_Bureau_Membership_gne__c membership : this.members){ nominations.add(new Speaker_bureau_membership_gne__c( User__c = Membership.User__c, Speaker_Status_gne__c = 'Nominated', Speaker_Scope_gne__c = membership.Speaker_Scope_gne__c, Speaker_Bureau_ID_gne__c = membership.Speaker_Bureau_ID_gne__c, Nomination_Date_gne__c = System.now(), Nominated_By_gne__c = UserInfo.getUserID(), Bureau_Member_gne__c = membership.Bureau_Member_gne__c )); } //try{ insert(nominations); //}catch(DmlException e){ //System.debug(e.getMessage()); //} //return (new ApexPages.StandardController(Speaker_Bureau_Membership_gne__c)).view(); }

 

 

 

 

Message Edited by astro on 05-07-2009 01:06 PM
  • May 07, 2009
  • Like
  • 0
I have a VF page for creating a new support Case. The page presents a list of valid Assets, once the user has chosen a Contact. Here's the VF

 

 

<apex:inputField value="{!theCase.ContactId}" id="the_contact"> <apex:actionSupport event="onchange" action="{!contactChangedAction}" status="updating_assets_status" rerender="assets, the_asset, asset_message" immediate="false"/> </apex:inputField>

 

 

 

If the user types or pastes in a valid Contact name, the apex contactChangedAction() method is invoked. But if the user presses the magnifying glass, contactChangedAction() is not invoked. How can I make sure that contactChangedAction() is invoked, by whatever means the user changes the contact?

I just realized you can't create a trigger on PricebookEntry. I need to be able to watch for changes to prices -- how can I do that?

I have an command button whose action method calls a method in my controller, the method is invoked and returns back to the commandbutton in which I have a 'onComplete=window.close();' which closes the window but the method invoked in my controller does absolutely nothing.  

 

I tried putting in broken code in that method and also tried everything I could to recieve an error message or atleast SOMETHING back from that method but I get nothing.

 

Any help would be greatly appreciated.

 

Thank's

 

 

<apex:page standardController="Speaker_Bureau_Membership_gne__c" showheader="false" sidebar="false"
extensions="em3_bureau_nomination_ctrlr">
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:form >
<!-- <apex:commandButton action="{!nominate}" value="Nominate Speakers"/>
<apex:commandButton action="{!cancel}" value="Cancel" onClick="window.top.close();"/>
<apex:actionFunction name="Nominate" action="{!nominate}" id="out"
status="myStatus" onComplete="window.close();"/>
-->
<apex:commandButton id="nominate" value="Nominate Speakers" action="{!nominate}" onComplete="alert('complete'); window.close();" />

<apex:commandButton value="Cancel" onClick="window.close();"/>
</apex:form>
</apex:pageBlockButtons>

<apex:Repeat value="{!members}" var="m">
<apex:pageBlock >
<apex:form >
<apex:facet name="header"><b>{!m.name}</b></apex:facet>
<apex:pageBlockSection title="{!m.name}" collapsible="false" columns="3">
<apex:outputField value="{!m.Bureau_Member_gne__c}" />

<apex:pageBlockSectionItem >
<apex:outputLabel value="Spaker Bureau" for="speaker_bureau"/>
<apex:selectList value="{!selected_option}" multiselect="false" size="1" id="speaker_bureau">
<apex:selectOptions value="{!Bureaus}"/>
</apex:selectList>
</apex:pageBlockSectionItem>

<apex:inputField value="{!m.Speaker_Scope_gne__c}" />
</apex:pageBlockSection>
</apex:form>
</apex:pageBlock>
</apex:Repeat>
</apex:pageBlock>
</apex:page>


apex controller method:

somes lines have been depricated that i just threw in while testing so there ignore them.

 

public void nominate(){ List<Speaker_Bureau_Membership_gne__c> nominations = new List<Speaker_Bureau_Membership_gne__c>(); for(Speaker_Bureau_Membership_gne__c membership : this.members){ nominations.add(new Speaker_bureau_membership_gne__c( User__c = Membership.User__c, Speaker_Status_gne__c = 'Nominated', Speaker_Scope_gne__c = membership.Speaker_Scope_gne__c, Speaker_Bureau_ID_gne__c = membership.Speaker_Bureau_ID_gne__c, Nomination_Date_gne__c = System.now(), Nominated_By_gne__c = UserInfo.getUserID(), Bureau_Member_gne__c = membership.Bureau_Member_gne__c )); } //try{ insert(nominations); //}catch(DmlException e){ //System.debug(e.getMessage()); //} //return (new ApexPages.StandardController(Speaker_Bureau_Membership_gne__c)).view(); }

 

 

 

 

Message Edited by astro on 05-07-2009 01:06 PM
  • May 07, 2009
  • Like
  • 0
I am trying to migrate some data from one SF account to another and after failed effort at using the Excel connector moved on to try the APex Data Loader with Data Export data from Account A. WHen I tried to use the Data Loader to insert the Account data object into Account B I was getting 100% "invalid cross reference id" errors. Upon further inspection of the error file I notice some "insufficient access rights on cross-reference id" errors as well. I googled and came across a thread on here that the problem may be related to OWNERID field. So I removed that field form the mapping and near 100% success. Alas I am still getting the "insufficient access rights on cross-reference id" errors. The other error has vanished.

Does anyone have any idea what could be done to resolve this as no one at SF seems to have a clue?
  • May 01, 2008
  • Like
  • 0