• Rosh
  • NEWBIE
  • 29 Points
  • Member since 2013
  • Salesforce Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 9
    Replies
How to use metadata API. I have generated Metadata WSDL through Develop >> Api, and created an apex class through it. The generated apex class contains lot of wrapper classes. Actually I am confused how to start with it. As per my requirement I have to add components to Home Page Layout through Apex, and my client has suggested to use Metadata API.

- Is it necessary to generate class through WSDL or there is other way also to use Metadata API.
- There are wrapper classes named "HomePageLayout" and "HomePageComponent" in the generated class but I have no idea how to use them.

Thanks in Advance
Roshan
  • April 16, 2014
  • Like
  • 0
Hi!

I need to define a javascript method on the event
like onChange='' some javascript code"  in the following code bt its giving an error: Unsupported attribute onchange in <apex:actionsupport>

             <apex:selectRadio value="{!Value}">
                    <apex:selectOptions value="{!items}"/>
                     <apex:actionsupport event="onchange" rerender="someBlock" status="waitStatus"  onChange='' some javascript code" />
                 </apex:selectRadio>

Thanks in advance.

  • January 13, 2014
  • Like
  • 0
Hi,

I have to implement a search functionality where

public class mycustomcontroller
{
public List<Contact> ContactObjects {get;set;}
 
public  PageReference runSearch(){
String firstName= ContactObj.FirstName;

// code
}
}

In the VF page i have used the below to capture the firstname.

<td><apex:outputLabel >Contact First Name &nbsp;</apex:outputLabel></td>
                    <td>
                 <apex:inputField value="{!ContactObj.FirstName}" id="fname"/>    
   </td>

M not able to get the value of firsntname.Its null in the debug logs.

Please help.

Thanks in advance.
  • January 09, 2014
  • Like
  • 0
Hi Developers,

I have one simple class (DemoClass) which have simple web service also i have one simple site in developer edition.
When i am testing the web service it will give me error  "Problem accessing /services/Soap/class/DemoClass."

so now i want to give access to DemoClass to the site profile.So please tell me the steps to give access

Thanks & Regards,
Rupam Raut

Hi,

 

Can We change default landing page of Chatter Feed to "All Company"

 

My chatter feeds default landing page is "What I follow" but I want to change it to "All Company"

 

Can't find anything so now am here 

Hi , I'm getting this error message : System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SetupChangeTechnologyListCheck: execution of AfterInsert caused by System.QueryException: List has no rows for assignment to SObject: : line 8, column 1

I don't understand why it doesn't find account objects, because there are alot of them in SF ?  Where should I start looking for an answer to this? Many thanks already, if you could somehow help me understand this better.

 

trigger SetupChangeTechnologyListCheck on Setup__c (after insert, after update)
{

    for(Setup__c s : trigger.new)
    {
        
        Account acc = [SELECT Name, Service_Type_List__c FROM Account WHERE RecordType.Name = 'Main Account' AND Name = :s.Main_Account__c];
                
        UpdateMainAccountTechnologyList techList = new UpdateMainAccountTechnologyList();
        techList.UpdateList(acc);
                
    }
}

  • December 13, 2013
  • Like
  • 0

Hi,

 

<apex:page Controller="selectst" >
<apex:form >
<apex:selectList value="{!str}">
<apex:selectOptions value="{!values}" />





</apex:selectList>

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

 

 

 

Controller :--------------

public class selectst {


public List<SelectOption> getValues() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('US','US'));
options.add(new SelectOption('CANADA','Canada'));
options.add(new SelectOption('MEXICO','Mexico'));
return options;
}

 

public string str {get;set;}

}

 

Can any one help me?

 

Can anyone tell me if this is possible? We are building some Visual Workflows, and I want to invoke an approval process from a button press by the user.

 

It appears that there is no way to facilitate this with the current tools. I think I can do this with an Apex plugin, and probably other ways, but we are trying to simplfy our future work by reducing code and tests and using built in tools. We are having pretty good luck with that so far, but I think the fun stops now (LOL).

 

Anyone know of an easy way to do this (hopefully without writing any code).

 

Thanks,

 

Peter

 

Hi all,

 

So I've been searching for an answer but not come up with an answer so hoping the experts here can help.


Currently with Communities Self Registration the contact record related to the user which is created on registration is current linked to one account set in the CommunitiesSelfRegController (see below):

 

/**
 * An apex page controller that supports self registration of users in communities that allow self registration
 */
public with sharing class CommunitiesSelfRegController {

    public String firstName {get; set;}
    public String lastName {get; set;}
    public String email {get; set;}
    public String password {get; set {password = value == null ? value : value.trim(); } }
    public String confirmPassword {get; set { confirmPassword = value == null ? value : value.trim(); } }
    public String communityNickname {get; set { communityNickname = value == null ? value : value.trim(); } }
    
    public CommunitiesSelfRegController() {}
    
    private boolean isValidPassword() {
        return password == confirmPassword;
    }

    public PageReference registerUser() {
    
           // it's okay if password is null - we'll send the user a random password in that case
        if (!isValidPassword()) {
            ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, Label.site.passwords_dont_match);
            ApexPages.addMessage(msg);
            return null;
        }    

        String profileId = null; // To be filled in by customer.
        String roleEnum = null; // To be filled in by customer.
        String accountId = ''; // To be filled in by customer.
        
        String userName = email;

        User u = new User();
        u.Username = userName;
        u.Email = email;
        u.FirstName = firstName;
        u.LastName = lastName;
        u.CommunityNickname = communityNickname;
    u.ProfileId = profileId;
        
        String userId = Site.createPortalUser(u, accountId, password);
      
        if (userId != null) { 
            if (password != null && password.length() > 1) {
                return Site.login(userName, password, null);
            }
            else {
                PageReference page = System.Page.CommunitiesSelfRegConfirm;
                page.setRedirect(true);
                return page;
            }
        }
        return null;
    }
}

 

My question is:  Has anybody modified the controller so an account is created for each contact when the user registers?

 

Thanks

Kev