• Ashish_Shelar
  • NEWBIE
  • 15 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hi there

I've been testing the maps example from the release notes today and every other time it get  URL No Longer Exists page.
For a couple of minutes it works fine then for another it gives me the error then it works again.
Is anybody experiencing the same issue?

Where can I learn more about apex:mapMarker and apex:map markers?
The release page redirects to api  version 32 which isn't helpful

thanks
  • January 11, 2015
  • Like
  • 1

Hi

help me!!

 

Page

<apex:page controller="PagingController">
<apex:form id="fid">


<apex:pageBlock title="Paging through Categories of Stuff">

<apex:pageBlockButtons location="top">
<apex:commandButton action="{!process}" value="Process Selected" onclick="confirm('Delete');} " />
<apex:commandButton action="{!cancel}" value="Cancel"/>
</apex:pageBlockButtons>
<apex:pageMessages />

<apex:pageBlockSection title="Category Results - Page #{!pageNumber}" columns="1">
<apex:pageBlockTable value="{!categories}" var="c" >
<apex:column width="25px">
<apex:inputCheckbox value="{!c.checked}"/>
</apex:column>
<apex:column value="{!c.cat.Name}" headerValue="Name"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>

<apex:panelGrid columns="4">
<apex:commandLink action="{!first}">First</apex:commandlink>
<apex:commandLink action="{!previous}" rendered="{!hasPrevious}">Previous</apex:commandlink>
<apex:commandLink action="{!next}" rendered="{!hasNext}" reRender="fid">Next</apex:commandlink>
<apex:commandLink action="{!last}">Last</apex:commandlink>
</apex:panelGrid>

</apex:form>
</apex:page>

 

controller

public class PagingController {

List<categoryWrapper> categories {get;set;}

// instantiate the StandardSetController from a query locator
public ApexPages.StandardSetController con {get; set;}
public ApexPages.StandardSetController getcon ()
{
if(con == null) {
con = new ApexPages.StandardSetController(Database.getQueryLocator([Select Id, Name FROM Position__c Order By Name limit 100]));
// sets the number of records in each page set
con.setPageSize(5);
}
return con;

}
// returns a list of wrapper objects for the sObjects in the current page set

public List<categoryWrapper> getCategories() {
getcon();
categories = new List<categoryWrapper>();
for (Position__c category : (List<Position__c>)con.getRecords())
categories.add(new CategoryWrapper(category));
System.debug(categories.size());
return categories;
}

// displays the selected items
public PageReference process() {
List<Position__c> positionList=new List<Position__c>();
for (CategoryWrapper cw : categories) {
if (cw.checked)
{
cw.cat.StatusTest__c=true;
positionList.add(cw.cat);
}

//ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,cw.cat.name));
}
update positionList;
return null;
}

// indicates whether there are more records after the current page set.
public Boolean hasNext {
get {
return con.getHasNext();
}
set;
}

// indicates whether there are more records before the current page set.
public Boolean hasPrevious {
get {
return con.getHasPrevious();
}
set;
}

// returns the page number of the current page set
public Integer pageNumber {
get {
return con.getPageNumber();
}
set;
}

 

// returns the first page of records
public void first() {
con.first();
}

// returns the last page of records
public void last() {
con.last();
}

// returns the previous page of records
public void previous() {
con.previous();
}

// returns the next page of records
public void next() {
con.next();
}

// returns the PageReference of the original page, if known, or the home page.
public void cancel() {
con.cancel();
}

}

 

 

After updating on clik of next i'm getting Visualforce Exception???

 

Can anyone please explain why it is so???

 

i not understanding usage of junction object .

Please explain usage and how to create junction object with a example

I am getting this error when using the following code:

 

<td><apex:outputField value="{!IF(contains(uses.Name,"Signage"),"N/A",uses.Gross_SF__c)}" /></td>

 

 Basically, I have an object (property uses) that I repeat through to build a table of data based on the different uses of a property.  If the current property use in my table is "Signage", I want to display "N/A" else I want to display the Integer value. 

 

There is a related post http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=1071 that suggests this is a bug and a bug fix has been requested. 

 

I am hoping that either I am doing something incorrectly and someone can point it out to me, or that someone might be able to come up with a better solution to this issue. 

 

I'm trying to copy a new user as contact by using a trigger but I'm getting the following error

 

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Contact, original object: User

 

trigger Acceleration_User_Copyto_Contact on User (after insert, after update) {
    
   // Map<String,User> newLead = new Map <String, User>();
    
    system.debug('Acceleration_User_Copyto_Contact Trigger....');
 
    for ( User user : System.Trigger.new)
    {
        if  (user.Email.contains('acceleration'))
        {
            system.debug('Acceleration_User_Copyto_Contact Trigger..2.');
            Integer RecordCount = [select count() from Contact c where c.Email = : user.Email];
            
            system.debug('Acceleration_User_Copyto_Contact Trigger..2a .' + RecordCount);
            
            if (RecordCount == 0)
            {
                String AccountId = '';
                for ( Account a : [Select a.Id From Account a where Name = 'Acceleration']) 
                {
                    system.debug('Acceleration_User_Copyto_Contact Trigger..3.');
                     
                    AccountId = a.Id;
                
                    Contact con = New Contact();
                    con.AccountId = AccountId ;
                    con.Email = user.Email;
                    con.Firstname = User.Firstname;
                    con.Lastname = User.Lastname ;
                    con.User__c = User.Id;
                    insert con;
                }          
            }                   
        }
        
     }
    
    
}

 

Hi there

I've been testing the maps example from the release notes today and every other time it get  URL No Longer Exists page.
For a couple of minutes it works fine then for another it gives me the error then it works again.
Is anybody experiencing the same issue?

Where can I learn more about apex:mapMarker and apex:map markers?
The release page redirects to api  version 32 which isn't helpful

thanks
  • January 11, 2015
  • Like
  • 1