• Nagesh B 13
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 14
    Replies
Hello,

Is any way to delete fields from Dimension Panel in Analytics?

Thanks in Advance.

Regards,
Nagesh B,
nag9311@gmail.com
Hi,

What is mean by System XMD in Einstein Analytics? Where i can find this file in Einstein analytics.

Thanks in Advance.

Regards,
Nagesh B,
nag9311@gmail.com
Hi ,

I am working on Einstein Analytics. I am getting below error when I ran one of the dataflow. 

Snapshot KSIRMContact
Found Dimensions in User XMD which are not present in System XMD: [ContactName, AccountName]

As per my understanding, Inorder to solve this error, Either i need to delete the AccountName, ContactName from the Dimensions panel or i should add the fields to System xmd.  Unfortunately I am unable to see delete option for fields in the Dimention panel. I am not sure about System XMD. May i know what is System XMD? Also Is any procedure to delete fields from the dimensions panel. 

Thanks in Advance. 

Regards,
Nagesh B.
nag9311@gmail.com
Hi All, 

i am new to Integration, i am trying to send a URL by HTTP Request and want to get Image from the Response.
I should update the User Profile pic with that image. 

i have excuted below code.

 objectname__X iosx=[select Name__c,DownloadUrl__c from Objectname__x WHERE Name__c='logo.jpg'];
           String UserIdValue=UserInfo.getUserId();
            Http h = new Http();
           HttpRequest req = new HttpRequest();
           req.setEndpoint(iosx.DownloadUrl__c);
           req.setTimeout(60000);
           req.setMethod('GET');
           req.setHeader('Content-Type', 'image/jpg');
           HttpResponse res = h.send(req);
           Blob body = res.getBodyAsBlob();
           System.debug('response::::' +res.getbody());

In the debug logs, it is printing 'response::::::' in the 1st line and after that line i am able to see below code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">




<Script>
//some logic relatd to handleRedirect()
</script>


</head>


</html>

<!--Body events--->
<Script type = //some logic>
</script>
</body>
</html>


<!--
------------------------------------------------------
------------------------------------------------------
----------------------------------------------------
---------------------------------------------------
-->

Is any Integration expert please help on this how to proceed forward.

Note:  req.setEndpoint(iosx.DownloadUrl__c); in this, the 'DownloadUrl__c' contains string which contains URL. if i take this URL and pasted in the browser and continued , the image is downloading in the local system.

getting no idea, please help on this. Thanks in Advance 

 
Hi ALL,

i have one requirement where should i call HttpRequest for Image and after getting the response i should take that image and set as that image as Current User profile image.  mine is not communirty. 

i have written below logic, but when i am checking documnet record attachment i am seeing blank image but having size.
please help me on this if i am doing anything wrong. 


           Http h = new Http();
           HttpRequest req = new HttpRequest();
           req.setEndpoint(iosx.DownloadUrl__c);
           req.setTimeout(60000);
           req.setMethod('GET');
           req.setHeader('Content-Type', 'image/jpg');
           HttpResponse res = h.send(req);
           Blob body = res.getBodyAsBlob();
           
              
           
           if(body!=NULL){
            Document document = new Document();
            document.AuthorId = UserInfo.getUserId();
            document.FolderId = UserInfo.getUserId(); 
           document.Body = body;
            
            document.Name=iosx.Name__c;
            document.contentType='image/jpg';
            document.IsPublic = true;
            insert document;
            
          ConnectApi.BinaryInput photoFileInput = new ConnectApi.BinaryInput(body,'image/jpg',iosx.Name__c);  
          ConnectApi.photo profilepic=ConnectApi.UserProfiles.setPhoto(null,UserIdValue,photoFileInput);
Hi All,

is any one used inline if else condition or Ternory operator usage on oncomplete in VF. based on that i wanna call different java script functions based on variable. please let me know the syntax if any body knows and if it is possible.

Thanks,
Nagesh B
Generate XML by Using Batch. Is any Exmple for generating XML by Apex Code?
if anyone have, please provide.
Hi All,

I have below requirement. please anyone help to achieve this.

i have one Custom VF, where it is having custom save action. The Save Method performing some logic and it is having return type as PageReference. so it is redirecting to detail page of the record. My Requirement is , i need to show alert pop up warning msg on the VF after click on save, then on the pop when i say Ok it should save the record and it should redirect to the detail page, when i say cancel, then it should return to previous page. the Save button using action method. it was existed code. i have tried with Onclick, Oncomplete jeff douglas examle code, but the problem is it is displaying the alert for fraction of seconds then automatically redireting to the detail page without any user interaction on the popup. please help me is any work around. i need to display alert popup only when checking some logic in the save method only. it is very helpful to me.
Any one can suggest any PDF or Example on Web Services and Salesforce Integration?
i am going through few PDF's and links but not able to get hands on practise  properly how to use SOAP, REST,WSDL step by step?
Is any Practical example step by step?
Hi Everyone,

I am not able to achieve the challenge in trial head  for below lightening concept.

Create a simple Lightning component with a styled headline. The headline must use an H1 tag with a CSS class that enforces a 24px font-size. Make the component available in the Navigation Menu of Salesforce1.
The component must be named 'MyLightningComponent'.
The component must include an H1 tag with a CSS class named 'headline'. The 'headline' CSS class must set a font-size of 24px.
The Lightning Component tab that is added to Salesforce1 must be called 'MyLightning'

i have created below components in my org.

1) MyLightningComponent.cmp

<aura:component implements="force:appHostable">
    <div class="headline">
        <h1>Headline</h1>
    </div>
</aura:component>

2) When i click 'style' button , 'MyLightningComponent.css' was created automatically and i have written below code.

.THIS.headline {
    padding-top: 24px;
}
 
I am getting below error when i check the challenge.  please any body suggest me if i am doing wrong.

Challenge Not yet complete... here's what's wrong:
The component does not include an H1 tag with a 'headline' CSS class


Thanks,
Nag.


 
Hi all,

i have below requirement in trialhead.

For this challenge, you will need to create a class that has a method accepting two strings. The method searches for contacts that have a last name matching the first string and a mailing postal code (API name: MailingPostalCode) matching the second. It gets the ID and Name of those contacts and returns them.
The Apex class must be called 'ContactSearch' and be in the public scope.
The Apex class must have a public static method called 'searchForContacts'.
The 'searchForContacts' method must accept two incoming strings as parameters, find any contact that has a last name matching the first, and mailing postal code matching the second string. The method should return a list of Contact records with at least the ID and Name fields.
The return type for 'searchForContacts' must be 'List<Contact>'.

i have written below code, but when i check challenge it is giving error.  like
'Challenge Not yet complete... here's what's wrong:
Executing the 'searchForContacts' method failed. Either the method does not exist, is not static, or does not return the expected contacts.

'Am i doing anything wrong?  please correct me or guide on this.

public class ContactSearch {
    
    public static List<Contact> searchForContacts(String sname,String postalcode)
    {
        List<Contact> Clist;
       
      insert new Contact[]{new Contact(LastName='aint',MailingPostalCode__c='5600069'),
            new Contact(LastName='aria',MailingPostalCode__c='5700085')};
       
      clist=[select Id,Name from Contact Where  LastName=:sname and MailingPostalCode__c=:postalcode];
        return clist;
    }
}

Thanks,
Nag.
Hi All,

is any one used inline if else condition or Ternory operator usage on oncomplete in VF. based on that i wanna call different java script functions based on variable. please let me know the syntax if any body knows and if it is possible.

Thanks,
Nagesh B
Any one can suggest any PDF or Example on Web Services and Salesforce Integration?
i am going through few PDF's and links but not able to get hands on practise  properly how to use SOAP, REST,WSDL step by step?
Is any Practical example step by step?
Hi Everyone,

I am not able to achieve the challenge in trial head  for below lightening concept.

Create a simple Lightning component with a styled headline. The headline must use an H1 tag with a CSS class that enforces a 24px font-size. Make the component available in the Navigation Menu of Salesforce1.
The component must be named 'MyLightningComponent'.
The component must include an H1 tag with a CSS class named 'headline'. The 'headline' CSS class must set a font-size of 24px.
The Lightning Component tab that is added to Salesforce1 must be called 'MyLightning'

i have created below components in my org.

1) MyLightningComponent.cmp

<aura:component implements="force:appHostable">
    <div class="headline">
        <h1>Headline</h1>
    </div>
</aura:component>

2) When i click 'style' button , 'MyLightningComponent.css' was created automatically and i have written below code.

.THIS.headline {
    padding-top: 24px;
}
 
I am getting below error when i check the challenge.  please any body suggest me if i am doing wrong.

Challenge Not yet complete... here's what's wrong:
The component does not include an H1 tag with a 'headline' CSS class


Thanks,
Nag.


 
Hi all,

i have below requirement in trialhead.

For this challenge, you will need to create a class that has a method accepting two strings. The method searches for contacts that have a last name matching the first string and a mailing postal code (API name: MailingPostalCode) matching the second. It gets the ID and Name of those contacts and returns them.
The Apex class must be called 'ContactSearch' and be in the public scope.
The Apex class must have a public static method called 'searchForContacts'.
The 'searchForContacts' method must accept two incoming strings as parameters, find any contact that has a last name matching the first, and mailing postal code matching the second string. The method should return a list of Contact records with at least the ID and Name fields.
The return type for 'searchForContacts' must be 'List<Contact>'.

i have written below code, but when i check challenge it is giving error.  like
'Challenge Not yet complete... here's what's wrong:
Executing the 'searchForContacts' method failed. Either the method does not exist, is not static, or does not return the expected contacts.

'Am i doing anything wrong?  please correct me or guide on this.

public class ContactSearch {
    
    public static List<Contact> searchForContacts(String sname,String postalcode)
    {
        List<Contact> Clist;
       
      insert new Contact[]{new Contact(LastName='aint',MailingPostalCode__c='5600069'),
            new Contact(LastName='aria',MailingPostalCode__c='5700085')};
       
      clist=[select Id,Name from Contact Where  LastName=:sname and MailingPostalCode__c=:postalcode];
        return clist;
    }
}

Thanks,
Nag.

HI ALl,

I have a requirement with Salesforce with Amazon server with S3 Integration. I need to upload the files and same time download the files or URL of file form Amazon to  Salesforce.

I have uploaded the file using PUT method. Response i m receiving is like only [Status=OK and Statuscode=200] successful
but i m not getting any other things like uploadid or URL of the file.

i need URL of the File uploaded in Salesforce. Help me out from this

Thanks,

Reddy

Hello
what is difference between stateful and stateless?
​Any issues if batch class is executed statelss (without stateful)?

when do we go for stateful and when do we go for stateless?

Please explain​

Hi There,

I have to generate a XML file.

when I click on button button should generate a xml schema file.

 

I am able to create a xml file with the help of  "XmlStreamWriter" class.

 

and able to print in system.debug. but i want to generate xml schema  or what ever I am printing in system debug generate as xml file when i click on button.

 

Example  below xml generate for teh conroller

 

XmlStreamWriter w =newXmlStreamWriter();

w.writeStartDocument(null,'1.0 encoding=UTF-8');

w.writeStartDocument(null,'<soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">');

w.writeStartElement(null,'Enrol_Event__c ',null);

 

for(Enrol_Event__cenrollEvent : getEnrollmentEventList()){

 

w.writeStartElement('my','LANID','my');

w.writeCharacters('12345678910');

w.writeEndElement();

 w.writeStartElement('my','LegalCompanyName','my');

w.writeCharacters(enrollEvent.PREF_CO_NM__c);

w.writeEndElement();

 w.writeStartElement('my','EnrollmentManagerName','my');

w.writeCharacters(enrollEvent.DSPCH_REP_ID__r.Name);

w.writeEndElement();

 w.writeStartElement('my','ExceptionsSection','my');

 w.writeStartElement('my','ExceptionsDetails','my');

w.writeCharacters(enrollEvent.EXCPT_DET_TXT__c);

w.writeEndElement();

 w.writeStartElement('my','ExceptionsApprovedBy','my');

w.writeCharacters(enrollEvent.EXCPT_APRVD_NM__c);

w.writeEndElement();

 w.writeEndElement();

 

w.writeEndElement();

w.writeEndDocument();

string xml = w.getXmlString();

w.close();

 

system.debug(xml);

 

out put

 

<?xml version="1.0" encoding="UTF-8"?>
<my:myField>
<my:LANID>12345678910</my:LANID>

<my:LegalCompanyName>Preferred Company Name</my:LegalCompanyName>

<my:EnrollmentManagerName>Betsy Barrett</my:EnrollmentManagerName>

<my:ExceptionsSection>

<my:ExceptionsDetails>The cost of the BC is waived for this event.</my:ExceptionsDetails>

<my:ExceptionsApprovedBy>Katie Anderson</my:ExceptionsApprovedBy>

</my:ExceptionsSection>

</my:myField>

 

can any one suggest me how to generate xml schema file or xml file when i click on button.

I'm encountering some rather odd behaviour with a SOQL query involving a join to a junction object.

 

I have two custom objects, Custom_a__c and Custom_b__c and a junction object for modelling a multi-multi relationship between them.

 

I have a list of ids for Custom_b__c objects that should exclude their associated Custom_a__c objects from availability.

 

The code in question is as follows:

 

List<Custom_a__c> available=[select id, Name from Custom_a__c where id NOT IN (select Custom_a__c from A_to_B_Association__c where Custom_b__c IN :excludeIds ) ];

 

 

I have a number of unit tests that check all the edge cases for this, and they are initially all working when run from the Force IDE or online.

 

However, after a period of time they will all suddenly fail.  I have plenty of debug in the unit tests that shows my test data is not changing between runs.  Even stranger, if I add an additional whitespace entry to the code above and save it back, the next run of the unit tests works fine. 

 

I also have another version of this code that carries out the same processing, but splits the SOQL into two queries, and the unit tests for this version never fail.

 

Has anybody else experienced this behaviour?  I've been looking through all the documentation and I can't see anything that is wrong with the SOQL.  I'm wondering if there are issues around using fields in the where clause of a join that aren't retrieved in the select, although that wouldn't explain why it works for a while and then goes wrong.