How to create Salesforce Visual Force wizard

    How to create the salesforce wizard from VF pages and Apex:  Create Apex Controller : /*  * @Author:Manjeet Singh  * @Purpose: Create Visualforce Wizard for Account,Contact and Opportunity  * @Description: Create individiual VF page for Account,Contact and opportunity and handled all the VF pages from one controller  * @Date:  2/12/2018  * @Modified By: Sourabh and Naresh  * @Modified Date: 2/12/2018  * */ public class VFWizardCtrl{     public Account objAccount{get;set;}     public Contact objContact{get;set;}     public Opportunity objOpportunity{get;set;}     //Initializing class level variables     public VFWizardCtrl()     {         objOpportunity=new Opportunity();         objAccount=new Account();         […]

fetch the dependent picklist value – UI API in APEX salesforce

To Fetch the dependent Picklist value: https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_picklist_values.htm   /ui-api/object-info/{objectApiName}/picklist-values/{recordTypeId}/{fieldApiName} objectApiName—The API name of a supported object. recordTypeId—The ID of the record type. fieldApiName—The API name of the picklist field on the object. public class FetchPicklist { public list<DependentValues> getValidPicklistOptionsFromDependencyMatrix(String standardObject, Id recordTypeId, String DependentFieldName, String selectedValue) { List<DependentValues> dpnPckLst = new List<DependentValues>(); String url = ‘callout:REST_UI_API/services/data/v43.0/ui-api/object-info/’+standardObject+’/picklist-values/’+recordTypeId+’/’+DependentFieldName; if(String.isNotBlank(getCalloutResponseContents(url))) { Map<String, Object> response = (Map<String, Object>)JSON.deserializeUntyped(getCalloutResponseContents(url)); Map<String, Object> controllerValues = (Map<String, Object>)response.get(‘controllerValues’); //System.debug(controllerValues.get(selectedValue)); //Checking if the controller values consists of the specified key if(controllerValues.containsKey(selectedValue)) { //Getting all the data in values property of the JSON response, i.e., the dependent picklist values List<Object> pickListValues = (List<Object>)response.get(‘values’); System.debug(‘:: pickListValues :: ‘+pickListValues); String valuesStr = JSON.serialize(response.get(‘values’)); System.debug(‘:: […]

Nube Lead Infoventure Pvt Ltd