• Vishnu Prasad 18
  • NEWBIE
  • 5 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 10
    Replies
Hi Team,

I have a requirement to import data into some particular objects from CSV which are placed at particular path at particular time.

Request you to kindly help in that.

Thanks,
  Vishnu
Hi Team,

I am working on a requirement where in I need to explose Apex class as web service which can accepts request to create multple records. Lets consider ,there is a custom object called "Booking". Apex web service will accept request to create multiple booking at a time. Request may contain more than 5000 records as well. Please suggest how to develop this.

Thanks,
  Vishnu

 
Hi,

 I am working on one of the requirement where I am receiving JSON string in the response. I am confused whether to use JSON Parser or JSON Deserialization. Can someone provide some details about these 2 methods to extract the value from JSON string. 

Thanks,
  Vishnu
Hi,

 I am working on one of the requirement where I am receiving JSON string in the response. I am confused whether to use JSON Parser or JSON Deserialization. Can someone provide some details about these 2 methods to extract the value from JSON string. 

Thanks,
  Vishnu
Hi Team,

I have a requirement to import data into some particular objects from CSV which are placed at particular path at particular time.

Request you to kindly help in that.

Thanks,
  Vishnu
Hi Team,

I am working on a requirement where in I need to explose Apex class as web service which can accepts request to create multple records. Lets consider ,there is a custom object called "Booking". Apex web service will accept request to create multiple booking at a time. Request may contain more than 5000 records as well. Please suggest how to develop this.

Thanks,
  Vishnu

 
Hi,

 I am working on one of the requirement where I am receiving JSON string in the response. I am confused whether to use JSON Parser or JSON Deserialization. Can someone provide some details about these 2 methods to extract the value from JSON string. 

Thanks,
  Vishnu
Hi Team,

I am trying to check the challenge 'Learn the Process for Developing Lightning Components'', but getting error as below.

Error:
Challenge Not yet complete... here's what's wrong: 
The 'harnessApp' Lightning App does not contain ''.

App code :harnessApp
<aura:application>    
    <c:myFirstComponent/>    
</aura:application>

Component code: myFirstComponent
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    <p>I am proficient in JavaScript</p>
</aura:component>

Please hlep me to get is solved. I am unbale to understand what went wrong.

Thanks,
Ash G
  • September 13, 2017
  • Like
  • 0
Hi All ,

I am trying to comunicate between facebook and salesforce by using the facebook toolkit .I have installed the toolkit and configure as per the below link .

https://github.com/developerforce/Force.com-Toolkit-for-Facebook

Now I am getting error (Recieved 400 from https://graph.facebook.com/me/home?access-token=null{"error":{"message":"Invalid OAuth access token",""type":"OAuthException","code":190,"fbtrace_id":DPGea\/xO92S})

Please suggest incae any one already fixed this issue .

Thanks 
Manoj
I am trying to complete challenge for Visualize your Business data. 

I have added the report chart as a scatter chart and the challenge is still giving me this error " The 'Property Listings' report does not appear to be using a scatter chart. 

User-added image
Problem Statement:

Create a form to enter new items and display the list of items entered. To make our camping list look more appealing, change the campingHeader component to use the SLDS. Similar to the unit, style the Camping List H1 inside the slds-page-header. Modify the campingList component to contain an input form and an iteration of campingListItem components for displaying the items entered.
  • The component requires an attribute named items with the type of an array of camping item custom objects.
  • The component requires an attribute named newItem of type Camping_Item__c with default quantity and price values of 0.
  • The component displays the Name, Quantity, Price, and Packed form fields with the appropriate input component types and values from the newItem attribute.
  • The JavaScript controller checks to ensure that the Name, Quantity and Price values submitted are not null.
  • If the form is valid, the JavaScript controller pushes the newItem onto the array of existing items, triggers the notification that the items value provider has changed, and resets the newItem value provider with a blank sObjectType of Camping_Item__c.

My Code:

CampingList.cmp

 
<aura:component >
	<ol>
        <li>Bug Spray</li>
        <li>Bear Repellant</li>
        <li>Goat Food</li>
    </ol>
 <aura:attribute name="items" type="Camping_Item__c[]"/>
 <aura:attribute name="newItem" type="Camping_Item__c"
     default="{'sobjectType': 'Camping_Item__c',
                    'Name': '',
                    'Price__c': 0,
                    'Quantity__c': 0,
                    'Packed__c': false }"/>    
    <div style = "slds">
    <div class="slds-col slds-col--padded slds-p-top--large">
		<div aria-labelledby="newform">
			<fieldset class="slds-box slds-theme--default slds-container--small">
				<legend id="newform" class="slds-text-heading--small slds-p-vertical--medium">New Form</legend>
				<form class="slds-form--stacked">
					<div class="slds-form-element slds-is-required">
						<div class="slds-form-element__control">
							<ui:inputText aura:id="formname" label="Name" class="slds-input" labelClass="slds-form-element__label" value="{!v.newItem.Name}" required="true"/>
						</div>
					</div>
					<div class="slds-form-element slds-is-required">
						<div class="slds-form-element__control">
							<ui:inputCurrency aura:id="formprice" label="Price" class="slds-input" labelClass="slds-form-element__label" value="{!v.newItem.Price__c}" placeholder="0"/>
						</div>
					</div>
					<div class="slds-form-element">
						<div class="slds-form-element__control">
							<ui:inputNumber aura:id="formquantity" label="Quantity" class="slds-input" labelClass="slds-form-element__label" value="{!v.newItem.Quantity__c}" required="true" placeholder="0"/>
						</div>
					</div>
					<div class="slds-form-element">
						<ui:inputCheckbox aura:id="formpacked" label="Packed?" class="slds-checkbox" labelClass="slds-form-element__label" value="{!v.newItem.Packed__c}"/>
					</div>
					<div class="slds-form-element">
						<ui:button label="Create Form" class="slds-button slds-button--brand" press="{!c.clickCreateFormData}"/>
					</div>
				</form>
			</fieldset>
		</div>
    </div>

    <div class="slds-card slds-p-top--medium">
        <header class="slds-card__header">
            <h3 class="slds-text-heading--small">Camping</h3>
        </header>
        
        <section class="slds-card__body">
            <div id="list" class="row">
                <aura:iteration items="{!v.items}" var="items">
                    <c:campingListItem item="{!items}"/>
                </aura:iteration>
            </div>
        </section>
    </div>    
	</div>
</aura:component>
CampingListController.js:
 
({
    clickCreateFormData: function(component, event, helper) {

        var validitem = true;
        
        var nameField = component.find("formname");
        var expname = nameField.get("v.value");
		if ($A.util.isEmpty(expname)){
            validitem = false;
            nameField.set("v.errors", [{message:"Expense name can't be blank."}]);
        }
        else {
            nameField.set("v.errors",null);
        }
        
        var priceField = component.find("formprice");
        var expprice = nameField.get("v.value");
            if ($A.util.isEmpty(expprice)){
            validitem = false;
            priceField.set("v.errors", [{message:"Expense price can't be blank."}]);
        }
        else{
            priceField.set("v.errors",null);
        }
        
        var quantityField = component.find("formquantity");
        var expquantity = nameField.get("v.value");
        if ($A.util.isEmpty(expquantity)){
            validitem = false;
            quantityField.set("v.errors", [{message:"Expense quantity can't be blank."}]);
        }
        else{
            quantityField.set("v.errors",null);
        } 
        
      /*  if(validExpense){
            var newItem = component.get("v.newItem");
            console.log("Create item: " + JSON.stringify(newItem));
            helper.createExpense(component, newItem);
        } */
         if(validitem){
            var newItem = component.get("v.newItem");
            console.log("Create item: " + JSON.stringify(newItem));
        	var theItem = component.get("v.items");
            var newItem = JSON.parse(JSON.stringify(newItem));
            theItem.push(newItem);
            component.set("v.newItem",newItem);
        }
        component.set("v.newItem",{'sobjectType': 'Camping_Item__c',
                    'Name': '',
					'Price__c': 0,                                   
                    'Quantity__c': 0,
                    'Packed__c': false });
    }
})
CampingListItem.cmp:
 
<aura:component implements="force:appHostable">
   <aura:attribute name="item" type="Camping_Item__c"/>
     <p>The Item is: 
         <ui:outputText value="{!v.item}" />
    </p> 
    <p>Name:
        <ui:outputText value="{!v.item.Name}"/>
    </p>
    <p>Price:
    	<ui:outputCurrency value="{!v.item.Price__c}"/>
    </p>
    <p>Quantity:
		<ui:outputNumber value="{!v.item.Quantity__c}"/>
    </p>
    <p>Packed?:
    	<ui:outputCheckbox value="{!v.item.Packed__c}"/>
    </p>
    
  <!--  <p>
    	<ui:button label="Packed!" press="{!c.packItem}"/>
    </p> -->
</aura:component>

Could anyone help pass and run the challenge.

Thanks.
Hi,

I am trying to make a callout to a Siebel Web Service to send the account created.

Here is what I did so far :
1. Generated the Classes from WSDL received from Siebel
2. Remote Site Setting Maintained with the URL ( http://192.168.XX.XX/SOME_PATH)
3. Created sample VF page for account Creation
4. Controller is implemented to perform call out with a @future Method
5. In the @future method, which is doing the callout actually, I have provided the access parameters for auth in the header like shown in the below code :

Still I am wondering why would this callout failed ?

Please suggest me what would have been missed or any workaround to get this resolved ?

Code of Controller :

public with sharing class calloutAccount {

    public Account account { get; private set; } 

    public calloutAccount(ApexPages.StandardController controller) 
    {
        Id id = ApexPages.currentPage().getParameters().get('id');
        account = (id == null)? new Account() : [SELECT Name, AccountNumber, Account_Status__c FROM Account WHERE Id = :id];
    }
    
    public PageReference saveAccount() 
    {
        try 
        {
            upsert(account);
        } 
        catch(System.DMLException e) 
        {
            ApexPages.addMessages(e);
            return null;
        }
        //  After successful Save, navigate to the default view page
        PageReference redirectSuccess = new ApexPages.StandardController(Account).view();         
                           
        DoCallout(account.Id,account.Account_Status__c);       
            
        return (redirectSuccess);
    }
    
    public PageReference cancelAccount() 
    {
        //  After Cancel, navigate to the default view page
        PageReference redirectSuccess = new ApexPages.StandardController(Account).view();
        return (redirectSuccess);
    }
    
    @future(callout=true)
        private static void DoCallout(Id actID,String actStatus)
        {   
            Account account = [SELECT Name,AccountNumber,Account_Status__c FROM Account WHERE Id =: actID];  //Query for the inserted account ABOVE
                
            System.debug(' @@@ acccount ID from FUTURE menthos() = '+ account.Id);
                                       
                string UName = 'username'; 
                string Passwd = 'password';                             
                string SoapXMLBody;
    
SoapXMLBody = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:asi="http://siebel.com/asi/" xmlns:acc="http://www.siebel.com/xml/Account%20Interface"> <soapenv:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"> http://schemas.xmlsoap.org/ws/2002/07/secext <wsse:UsernameToken xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"> <wsse:Username>'+ UName + '</wsse:Username> <wsse:Password Type="wsse:PasswordText">' + Passwd + '</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <asi:SiebelAccountSynchronize_Input> <acc:ListOfAccountInterface> <!--Zero or more repetitions:--> <acc:Account operation="insert"> <!--Optional:--> <acc:AccountId>' + account.AccountNumber + '</acc:AccountId> <acc:AccountStatus>' + account.Account_Status__c + '</acc:AccountStatus> <acc:Name>' + account.name + '</acc:Name> </acc:Account> </acc:ListOfAccountInterface> </asi:SiebelAccountSynchronize_Input> </soapenv:Body> </soapenv:Envelope>' ;                
 
               System.debug('@@@ SoapXMLBody = '+SoapXMLBody);
               
                            string SoapXML; 
                            SoapXML = SoapXMLBody; 
                            Integer ContentLength = 0; 
                            ContentLength = SoapXML.length(); 
                            
                            Http h = new Http(); 
                            HttpRequest req = new HttpRequest(); 
                            HttpResponse res = new HttpResponse(); 
                            
                            req.setMethod('POST'); 
                            req.setEndPoint('http://192.XXX.XX.XX/eautomotive_enu/start.swe?'); 
                            req.setHeader('Content-type','text/xml'); 
                            req.setHeader('Content-Length',ContentLength.format()); 
                            req.setHeader('SoapAction','http://192.XXX.XX.XX/eautomotive_enu/start.swe?'); 
                            req.setBody(SoapXML); 
                            
                            System.Debug('@@@ req.getHeader'+req.getHeader('req.getHeader; '+'Content-Length')); 
                            System.Debug('@@@ req: '+req); 
                            System.Debug('@@@ req.getBody'+req.getBody()); 
                            
                            res = h.send(req);                             
                            System.Debug('@@@ res: === '+res);                             
                            String auth = res.getBody();                             
                            System.Debug('@@@ Debug(auth:'+auth);
        
        }      

}


DEBUG LOG : for the response. 

</head><body id=ERR_ACCESS_DENIED>
<div id="titles">
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="http://192.XXX.XX.XX/eautomotive_enu/start.swe?">http://192.XXX.XX.XX/eautomotive_enu/start.swe?</a></p>

<blockquote id="error">
<p><b>Access Denied.</b></p>
</blockquote>

<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>

<p>Your cache administrator is <a href="mailto:support@salesforce.com?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%20proxy-was.net.salesforce.com%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Wed,%2017%20Feb%202016%2022%3A47%3A34%20GMT%0D%0A%0D%0AClientIP%3A%2010.242.12.23%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Feautomotive_enu%2Fstart.swe%3F%20HTTP%2F1.1%0AContent-Type%3A%20text%2Fxml%0D%0AUser-Agent%3A%20SFDC-Callout%2F36.0%0D%0ASFDC_STACK_DEPTH%3A%201%0D%0AContent-Length%3A%20937%0D%0ASoapAction%3A%20http%3A%2F%2F192.168.10.14%2Feautomotive_enu%2Fstart.swe%3F%0D%0ACache-Control%3A%20no-cache%0D%0APragma%3A%20no-cache%0D%0AHost%3A%20192.168.10.14%0D%0AAccept%3A%20text%2Fhtml,%20image%2Fgif,%20image%2Fjpeg,%20*%3B%20q%3D.2,%20*%2F*%3B%20q%3D.2%0D%0AProxy-Connection%3A%20keep-alive%0D%0AX-Forwarded-For%3A%2010.242.64.10%0D%0A%0D%0A%0D%0A">support@salesforce.com</a>.</p>
<br>
</div>

<hr>
<div id="footer">
<p>Generated Wed, 17 Feb 2016 22:47:34 GMT by proxy-was.net.salesforce.com (squid)</p>
<!-- ERR_ACCESS_DENIED -->
</div>
</body></html>

We plan to do data migration one siebel crm  to salesforce, does anyone know if org data and positions data which mean a lot in siebel need to be migrated for records to show?

 

thanks