• Valnavjo
  • NEWBIE
  • 5 Points
  • Member since 2012
  • CTO at Clapps


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 12
    Replies

Hi,

 

What I'm trying to say is, Synchronously or Asynchronously? Does the "Disable Parallel Apex Testing" from "Apex Test Execution" screen affect to this process?


Many thanks,

JVN

Hi,

 

Just wanted to report an issue, that is pretty similar to this one:

 

https://sites.secure.force.com/success/issues_view?id=a1p30000000RdurAAC

 

but in my case, with a "Component.Apex.InputText" component and the "Label" attribute. As a workaround, instead of deleting the stuff, just add "if (!Test.isRunningTest())", something like:

 

if (!Test.isRunningTest()) myInputText.Label = 'My text label';

 

 

Happy coding!

 

Valnavjo

Hi,

 

What I'm trying to say is, Synchronously or Asynchronously? Does the "Disable Parallel Apex Testing" from "Apex Test Execution" screen affect to this process?


Many thanks,

JVN

Hello,

 

I have 1000 list of product names like

Name:

8 online

12 lives

34 services

Additional

Pages

Landing

Build

 

Now i need to build a list which can be filtered based on the straight alphabet.

A | B | C | D | .....| Other |

 

so query will be

 

Query: [ Select Name from Catelog__c where Name Like :string ]
//:string will get the param by selection like A% or B%  

 But i am strugling to make solution if the current page get param value == 'Other' then Query should display non-alphabetic values.

 

Any solution?

 

Thanks

 

 

 

 

 

Hello!

In my requirement -there is a picklist  field with multiple values. One of the values is 'Others'. My requirement is when 'Others' Is selected, it should show a text box(another field). 

What is the easiest way to do this ? I guess, I've to write a new visual force page. and somehow have to get IDs of the fields. But what is not clear to me, how can I get picklist field values in visual force page. 

How can I use them for show/hide fields?

Dear Expert,

I am trying to Pass parameter to Apex method from VF page.It work for remove But i am not able to get the parameter value for update.

 

<apex:repeat value="{!lstAuthContacts}" var="AC">
 <apex:form >
 <apex:commandLink value="Remove" action="{!removeContact}">
   <apex:param name="delContact" value="{!AC.Id}" assignTo="{!cParam}"></apex:param>
 </apex:commandLink>

<label>First name*</label>
<apex:inputField value="{!AC.FirstName}" styleClass="form-text" id="form-text-contact-first-name"/>

<label>Last name*</label>
<apex:inputField value="{!AC.LastName}" styleClass="form-text" id="form-text-contact-last-name"/>
<label>Phone*</label>
<apex:inputField value="{!AC.Phone}" styleClass="form-text" id="form-text-contact-phone"/>
<label>Email address*</label>
<apex:inputField value="{!AC.Email}" styleClass="form-text" id="form-text-contact-email"/>

<apex:commandButton action="{!updateAuthContact}" value="Save updates" id="theButton"> <apex:param name="updateContact" value="{!AC.Id}" assignTo="{!cParam}"></apex:param> </apex:commandButton>
</apex:form>
</apex:repeat>

 

 

public with sharing class AccountProfileController {
public Id aid {get;set;}
public string cParam{get;set;} public list<Contact> lstAuthContacts{get;set;} public AccountProfileController(){ getlstAuthContacts(); } private void getlstAuthContacts(){ aid = Apexpages.currentPage().getParameters().get('id'); if(aid != ''){ lstAuthContacts = [Select Contact.Id, Contact.Name, Contact.Contact_Type__c, Contact.FirstName, Contact.LastName, Contact.Phone, Contact.Email, Contact.MailingStreet, Contact.MailingCity, Contact.MailingState, Contact.MailingPostalCode, Contact.MailingCountry, Contact.Living_Will__c From Contact Where Contact.AccountId = :aid And Contact.Contact_Type__c = 'Authorized Contact']; } }
public PageReference removeContact(){
if(cParam != ''){
Contact toDel=new Contact(id=cParam);
delete todel;
getlstAuthContacts
}
returm null;
}
public PageReference updateAuthContact() {
if(cParam != ''){
Contact toUpdate=new Contact(id=cParam);
update toUpdate;
getlstAuthContacts();
}
return null;
}
}



Hi,

 

We've tryed the <chatter:feed> component inside a custom apex page and we are having issues with the "rerender" method, the first time that the object is rendered it shows all the feeds but when we try to call to the method <apex:actionFunction> passing the id of the chatterfeed object to the rerender parameter it doesn't retrieve all the feeds from a group.

 

Here is the code:

 

Visualforce page:

 

<apex:page controller="Elogos_ChatterController" sidebar="false" showheader="false">
      <a href="#" onclick="UpdateChatterFeed('xxxx');">Test Chatter Group</a>
      <apex:form >
            <apex:actionFunction name="UpdateChatterFeed" action="{!DoSomething}" rerender="chatterFeed" >
                  <apex:param name="entityId" assignTo="{!EntityId}" value="" />
            </apex:actionFunction>
      </apex:form>
      <chatter:feed id="chatterFeed" feedItemType="TextPost" showPublisher="true" rendered="true" entityId="{!EntityId}"/>
</apex:page>

 

Controller:

 

public with sharing class Elogos_ChatterController {

	public String EntityId{get;set;}
	
	public Elogos_ChatterController (){
		this.EntityId = 'xxxx'; // Chatter Group Id
	}
	
	public PageReference DoSomething(){
		return (null);	
	}
}

 

I hope your help.

 

Regards.

 

José Luis Almazán.

I am trying to create a partner portal user in a unit test., but having terrible difficulties. I understand that I must create a Contact and Account first, ensure the Account is a partner account, then create a user that points to the contact. However, I am unable to create a user that points to a contact.

 

 

Contact contact1 = new Contact(LastName = 'TestContact');
 Database.insert(contact1);
 Account account1 = new Account(Name = 'TestAccount');
 Database.insert(account1);
 account1.IsPartner = true;
 Database.update(account1);
 Profile profile1 = [Select Id from Profile where name = 'System Administrator'];
 UserRole userRole1 = new UserRole(
 	PortalType = 'Partner',
 	//PortalRole = 'Test',
 	//Name = 'Test Portal Role',
 	PortalAccountId = account1.Id
 );
 Database.insert(userRole1);
 User user1 = new User(
 	//IsPortalEnabled = true, // 4) Compiler says Field is not writeable.
 	//ContactId = contact1.Id, // 3) Runtime says Only Portal Users can be associated to a Contact.
 	UserType = 'PowerPartner', // 2) Compiler says field not writeable.
 	UserRoleId = userRole1.Id,
 	Username = System.now().millisecond() + 'test12345@test.com',
 	LastName = 'McTesty',
 	Email = 'test12345@test.com',
 	Alias = 'test123',
 	CommunityNickname = 'test12345',
 	TimeZoneSidKey = 'America/Los_Angeles',
 	LocaleSidKey = 'en_US',
	EmailEncodingKey = 'UTF-8',
	ProfileId = profile1.Id,
	LanguageLocaleKey = 'en_US'
);
Database.insert(user1);
//user1.IsPartner = true;
//user1.IsPortalEnabled = true;
//Database.update(user1);
//user1.ContactId = contact1.Id; // 1) Runtime says role type must match user type.
//Database.update(user1);

 

 

Can anyone paste some working code for this? Or maybe I'm making an obvious mistake?

 

How can I make a modal dialog page from a custom button. Guys if you have any idea please get back to me

  • March 20, 2012
  • Like
  • 0

Hello,

 

Is there a way I can have a modal dialog box pop up over a standard object detail page?

 

My use case is:  If our sales team moves an opportunity into a certain stage we want a pop-up over the entire page to deliver some information to them regarding the opportunity based on certain criterea.

 

I've tried using jQuery and YUI via VF Pages but the modal popups only interact within the inline page.  Is there a way I could get it to pop up over the entire detail page without rebuilding the detail page in a custom VF Page?  Would an S-Control work?

 

Thanks

Hi I have a question which I'm not 100% is possible in Salesforce but will welcome any suggestions / ideas. I have an APEX class which creates multiple licence keys and has dual functionality, it will either allow the user to email them as part of an email body or create the licenses as a txt file attachment to an outbound email. Now the issue is the text file needs to be enclosed within a zip file due to different mail clients unable to process the .lic extension. Is there any mechanism which will let me wrap a txt file into a zip file as part of an attachment ? Been wracking my brain for ages on this. Any assistance would be welcome even if its not possible.

  • October 01, 2010
  • Like
  • 0

I just read the posting "Modal Dialogs in Visualforce.." on the force.com blog, http://wiki.apexdevnet.com/index.php/Tutorial:_Modal_Dialogs_in_Visualforce_using_the_Yahoo%21_User_Interface_Library .

 

I was wondering if you can do this same thing, using a custom button or link on a standard salesforce page. So basically launch a custom modal dialog off of a standard page, and then have the content from the dialog update the standard page. Any ideas?