• David Jorjani
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I have created a community and want to publish it so users can login to the community. However, I do not see the 'manage' button the documents refer to. Please let me know how I can bring it back so I can publish my community.
I want to know what pages the current user has access to using apex and run a code dynamically to show a list of those pages on a visualforce page. I have found setupentityaccess but it works with permission sets and not profiles. I only use profiles at this point. Please let me know if there is a way to do this.
I have created a community and want to publish it so users can login to the community. However, I do not see the 'manage' button the documents refer to. Please let me know how I can bring it back so I can publish my community.
I have created a community and want to publish it so users can login to the community. However, I do not see the 'manage' button the documents refer to. Please let me know how I can bring it back so I can publish my community.
Hi all,

I have a test class where in i am trying to insert the test record but i doubt on they are being inserted properly

below is my code

@isTest
public class VisitHandler_Test
{
 //create test data
 
    static testMethod void createTestData()
    {
        
        Account acc=new Account(Name='Test Account',Channel__c='On-trade',
                                                   Premise_Type__c='Brown Café');
       	insert acc; 
             
        List<POSItemAccountLink__c> posLst=new List<POSItemAccountLink__c>();
        POSItem__c posItem=new POSItem__c(name='test item',type__c='Killer Item');
        insert posItem;
              
        for(Integer i=0;i<2;i++)
        {
            POSItemAccountLink__c pos=new POSItemAccountLink__c();
            pos.Account__c=acc.Id;
            pos.POSItemAccountLink__c=posItem.id;
            posLst.add(pos);
        }
        insert posLst;
        
        //assert 
        System.assertEquals(posItem.Name,'test item');
        
    }
}

Also i have mentioned an asset statement to check if the record is inserted successfully or no
but i dont know how do i check whether that asset statement is executed successfully or no as it does not appear in the logs

Any help would be appreciated

thanks

I need to create  a UserRole record as part of test class. The field 'PortalType' is a picklist defined field. I've seen several examples of reading the values from the picklist but no examples of how to create a new record containing a picklist field. not a new value, but a existing value within the picklist for this note new UserRole record. For example, this snippet will result in the error :'Field PortalType is not writable'. What is the correct procedure?

 

Regards,

 

 

UserRole r = new UserRole(RollupDescription =a.Name + ' Customer Manager',PortalType = 'Customer Portal', PortalRole = 'Manager', PortalAccountId = a.Id); insert r;

 

  • September 29, 2009
  • Like
  • 0