• VIPUL GOEL 10
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Senior Salesforce Developer
  • Axtria


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 1
    Replies
I'm trying to implement salesforce as IDP and Google or PHP web application as SP. Which requires Connected APP to be created in the IDP side. I created that one as well but when I Enable the "User Provisioning" in connected app it has some steps for the configuration in the User Provisioning Wizard. As soon as I open the Wizard it requires the User Provisioning Flow for connected Apps. I want to create it but there is not so much of information available in salesforce knowledge articles. Can you please help me in getting the understanding of it.   According to the video : https://www.youtube.com/watch?v=xCgy9ywYzuY    Vikas Jain explains the configuration but he also mentioned that there should be packages on the app exchange for the flow Creation. But I cannot see any packages related to it on the appExchange.  I really want to know the steps to create the User Provisioning Flow for Connected apps or the Apex Class Parameters for it.

I am working at a very large client and we are currently required to create a new sandbox each time we are ready for our next release to be tested.  For example we have DEVR1 that needs to be recreated into another sandbox named DEVRTEST1.  We have a developer who is using ANT to push the meta data from one org to another, but numerous elements are being missed such as:

 

Users

Roles

Some aspects of Profiles

Queues

Groups

Field History Tracking

Lead Field Mapping

Approval Processes

etc.

 

Needless to say it takes considerable time manually recreate the above items in each new sandbox.  Is there anyway to clone a SBX into a new Sandbox?

Component:
<aura:component controller="RemovefromDNCcontroller"
                implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickActionWithoutHeader" access="global">
    <ltng:require styles="{!$Resource.quickActionStyle}"/>
    <aura:attribute name="recordId" type="Id" />
    <aura:attribute name="Preval" type="RemovefromDNCcontroller" />
    <aura:attribute name="Preaccount" type="Id"/>
    <aura:attribute name="Precontact" type="Id"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:if isTrue = "{!v.Preval.messageDisplay}">
        <div class="slds-notify slds-notify_alert slds-theme_alert-texture slds-theme_info" role="alert">
            {!v.Preval.message}
        </div>
    </aura:if>
</aura:component>

Controller.js

({
    doInit : function(component, event,helper) {
        var action = component.get("c.Oppdetails");
        action.setParams({"OppId": component.get("v.recordId")});
        action.setCallback(this, function(response) {
            var responsedata = response.getReturnValue();
            var accid = response.getReturnValue().caseaccId;
            var conid = response.getReturnValue().caseContactId;
            var state = response.getState();
            console.log('accid==='+accid);
            console.log('conid==='+conid);
            helper.fetchAccdetail(component,event,helper,accid);
            helper.fetchCondetails(component, event, helper,conid);
            if (component.isValid() && state === "SUCCESS") {
                component.set("v.Preval", response.getReturnValue());
                helper.createCasDetails(component,event,helper,responsedata);
            }
        });
        $A.enqueueAction(action);
    },
})

Helper.js
({
    fetchAccdetail : function(component, event, helper,accid) {
        console.log('accid helper==='+accid);
        var action = component.get("c.accountPreCheck");
        action.setParams({
            "AccountcheckId" : accid
        });
        
        action.setCallback(this, function(response){
            var state = response.getState();
            console.log('response acc===='+response.getReturnValue());            
            if (state === "SUCCESS") {
                component.set("v.Preaccount", response.getReturnValue());
                //var Acc = component.get("v.Preaccount");
                //console.log("Acc---"+Acc);
            }
        });
        $A.enqueueAction(action);
    },
    fetchCondetails : function(component, event, helper,conid) {
        console.log('conid helper==='+conid);
        var action = component.get("c.contactPreCheck");
        action.setParams({
            "ContactcheckId" : conid
        });
        
        action.setCallback(this, function(response){
            var state = response.getState();
            console.log('response con==='+response.getReturnValue());            
            if (state === "SUCCESS") {
                component.set("v.Precontact", response.getReturnValue());
                //var con = component.get("v.Precontact");
                //console.log("con---"+con);
            }
        });
        $A.enqueueAction(action);
    },
    createCasDetails: function(component,event,helper,responsedata){
        console.log("responsedata---"+responsedata.messageDisplay);
        if(responsedata.messageDisplay == false){
            var Acc = component.get("v.Preaccount");
            var con = component.get("v.Precontact");
            console.log("Acccase---"+Acc);
            console.log("concase---"+con);
            var createCaseEvent = $A.get("e.force:createRecord");
            createCaseEvent.setParams({
                "entityApiName": "Case",
                "defaultFieldValues": {
                    'Case_Type__c'     : 'Do Not Call List Request',
                    'Account'        : Acc,
                    'Contact'        : con,
                    'Opportunity__c': responsedata.caseOppId
                }
            });
            createCaseEvent.fire();
        }
    },
})

Apex Class:

public with sharing class RemovefromDNCcontroller {

    @AuraEnabled public string caseaccId{get;set;}
    @AuraEnabled public string caseContactId{get;set;}
    @AuraEnabled public string caseOppId{get;set;}
    @AuraEnabled public string message{get;set;}
    @AuraEnabled public boolean messageDisplay{get;set;}
    
    @AuraEnabled 
    public static RemovefromDNCcontroller Oppdetails (Id OppId){
        RemovefromDNCcontroller rfd = new RemovefromDNCcontroller();
         rfd.messageDisplay = false;
        Opportunity o = [select id, Name,ownerId, AccountId, Account.PersonContactId, Do_Not_Call__c from Opportunity where Id =: OppId];
        system.debug('o----'+o);
        if(o.Do_Not_Call__c == true){
            system.debug('rfd 24'+ rfd.message);
            rfd.caseOppId = o.Id;
            rfd.caseContactId = o.Account.PersonContactId;
            rfd.caseaccId = o.AccountId;
            system.debug('caseContactId ==='+rfd.caseContactId);
            system.debug('caseaccId ==='+rfd.caseaccId);
            return rfd;
        }else{
            rfd.message = system.Label.Remove_from_DNC_Alert;
            rfd.messageDisplay = true;
            system.debug('rfd 32'+ rfd.message);
            return rfd;
            
        }
        
    }
    @AuraEnabled 
    public static Id accountPreCheck (Id AccountcheckId){
        system.debug('AccountcheckId--'+AccountcheckId);
        return AccountcheckId;
    }
    @AuraEnabled 
    public static Id contactPreCheck (Id ContactcheckId){
        system.debug('ContactcheckId--'+ContactcheckId);
        return ContactcheckId;
    }
}

In Helper, method createCasDetails, values in 
console.log("Acccase---"+Acc);
console.log("concase---"+con);
are not coming due to which values in Account and Contact are not pre-populating.
Please help.