Posts
Programatically create Partner Community Accounts using Apex / Salesforce
- Get link
- Other Apps
Step 1: GoTo Account Tab and Create a account name "User Account" Step 2: On Account Details page click on button " Manage External Account" and the click on " Enable As Partner". Make sure login user profile must have assign role Then user users=new users(); users.email='test@gmail.com'; users.firstname='ajay'; users.username='test@gmail.com'; users.lastname='Kumar'; Id p = [select id from profile where name=' Partner Community Profile' ].id; account ac= [select id from account where name='User Account' limit 1 ]; Contact objectContact = new Contact(LastName =users.lastname,AccountId = ac.Id); insert objectContact; User u = new User(contactId=objectContact.Id, username=users.username, firstname=users.firstname, lastname=users.lastname,
multi records selection from lookup in salesforce using apex
- Get link
- Other Apps
Step:1 Create object SELECT Name,id FROM Affiliation_Details__c WHERE name Like '+byName +' Step: 2 Create page where look up <apex:page standardController="User_Affiliation_Details__c" id="pageId" > <apex:form id="mainFormId"> <br/><br/><br/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/JavaScript" /> <apex:pageBlock title="New Client" id="pgBId" > <apex:pageMessages /> <table> <tr> <td>Affiliations Name</td> <td> <apex:inputHidden id="phoneNumberFieldId" value="{!selectedaffID}"/> <apex:inputTextarea disabled="true" id="phoneNameFieldId" style="