• saleforce bee
  • NEWBIE
  • -2 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 23
    Replies
My user case is to read/scan .txt file content in apex and thrown an error if it is not human readable format/virus content/executable content(.exe,.jar,war,javascript..etc contents).

Normally we can save .exe file as .txt file , if we open the same file it has exe content.
I am trying to achieve Autosave of the record every 5 minutes in Lightning.

Here is the code for Common component which can be included any page that record has to be auto-saved without user intervention

Everything works as expected. Only issue is that I can't kill autosave recursion loop when I move to other lightning page. Is there a way to clear the autosave loop , I am using cleartimeout in the code.


autoSave : function(component,event)
    {
        
        var thisHelper=this;
        var windowHelper=window;
        var timeValue=component. get("v. timer"); 
                
        component. set("v. timerValue", window. setTimeout(     
            
            $A. getCallback(function(){
                // To avoid auto save method call if component becomes invalid
                if(component. isValid()){
                    //Fire component event to access child component methods
                    var autoSaveEventValue = component. getEvent("autoSaveEvent");
                    autoSaveEventValue. fire();               
                    
                    thisHelper. autoSave(component);
                }
                // Clear the timer if component becomes invalid
                else{
                    windowHelper. clearTimeout( component. get("v. timerValue") );
                    
                }
                
                
            }
                          ),timeValue));
        
        
        
    },
Please help us on the below requirements
  • Exception logging utility class – where it will store exceptions into an object.
  • How will handle client exceptions in Lightning page
We have a requirement to display bar chart on Grand total values in sales force standard reports, How we can achieve this as charts are populated only for summary groups not for grant totals 
When I execute the batch apex ,it is consuming API calls count in the Org.

However, I haven't call any Sforce API inside the batch class ,and it would be a simple delete operation inside the batch class

Please clarify it
I want to populate HTML pick list values by apex class, Here i should not use 
<apex:selectList> </apex:selectList>
--------------------------------------------------------------------------------------------
Have to Use HTML select 
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>

Pls help me on this 

Use case:- upload csv file to 3rd party site.

 

I am facing issues with http file post (.csv file) along with some parameters (email, Sid…).

 

It would be great if suggest some idea pseudo code or code snippet . Pls refer my code and correct me where I am not able to post file.

 

 

--------------------------------------------------------------

<!--  String postbody;
//Post body
//String boundary = '__boundary__1234454545445xxx';
String boundary = 'oMiJCBHGVvZmU7s3FcUGXMbyU23aX_Ow';
String queryheader = '--'+boundary+'\n';
String header = '--'+boundary+'\n'
+ 'Content-Disposition: form-data; name="file"; filename="'+filename
+'"\nContent-Type: application/octet-stream\n\n';
//+'"\nContent-Type: application/vnd.ms-excel\n\n';

String footer = '\n--'+boundary+'--';
//String footer = '\n--'+boundary;

String body = EncodingUtil.base64Encode(filebody); //encodes the blob into a base64 encoded String
//String body = filebody.toString();
//encodes the blob into a base64 encoded String

filecontent= header + filebody + footer ;


querybody= queryheader +'Content-Disposition: form-data; name="email"\n\n'+EncodingUtil.urlEncode('mail12345@gmail.com', 'UTF-8')+'\n';

querybody= querybody+queryheader +'Content-Disposition: form-data; name="sid"\n\n'+EncodingUtil.urlEncode('20', 'UTF-8')+'\n';

querybody= querybody+queryheader +'Content-Disposition: form-data; name="field"\n\n'+EncodingUtil.urlEncode('EMAIL:INITIALIZE', 'UTF-8')+'\n';


querybody= querybody+queryheader +'Content-Disposition: form-data; name="field"\n\n'+EncodingUtil.urlEncode('SID', 'UTF-8')+'\n';



postbody=querybody+filecontent;




/*********************************call API 2************************/
// content type:Content-Type: multipart/form-data; boundary=

HttpRequest req1 = new HttpRequest();
HttpResponse res1 = new HttpResponse();
Http http1 = new Http();


req1.setHeader('Content-type','multipart/form-data; boundary='+boundary);
//req1.setHeader('Content-type','multipart/mixed; boundary='+boundary);
req1.setHeader('Content-Disposition', 'attachment;filename='+filename);
//req1.setHeader('Content-type', 'application/vnd.ms-excel');
req1.setHeader('Cookie',setcookie) ;
req1.setMethod('POST');
req1.setEndpoint('https://mailpostingapi.com/cgi-bin/api/load1');
req1.setBody(postbody);
//req1.setBody('hi');
//req1.setCompressed(true);
//req1.setTimeout(60000);
req1.setHeader('Content-Length',String.valueof(postbody.length()));

try {
res1 = http1.send(req1);


if (res1.getBody().indexOf('err')>-1)
{
system.debug('***********error occured');
system.debug('********'+res1.getbody());
output_cookie2 =res1.getbody();

}
else

{
output_cookie2 =res1.getbody();
system.debug('*****su***'+res1.getbody());
}
System.debug('status'+res1.toString());
return null;
}

catch(System.CalloutException e)
{
System.debug('Callout error: '+ e);
System.debug(res1.toString());
return null;
} --->

 

<apex:pageBlockTable value="{!prd}" var="a" id="table" border="2">            

                  <apex:column headerValue="Category">

                    <apex:inputField value="{!a.Category__c}"  />

                apex:column>

                <apex:column >

                   

                    <apex:outputtext id="dynamictext"   />

                 apex:column > 

                <apex:column headerValue="Description">

                    <apex:inputField value="{!a.Description__c}" />

                apex:column>

apex:pageBlockTable>

 

In above code snippet, when we select value of Category__c some value ,dynamic help text would be displayed in the dynamictext-ouput text.... It should be ajax enabled no postback allowed

 

Pls help me how to achieve it.

 

<apex:pageBlockTable value="{!prd}" var="a" id="table" border="2">            

                  <apex:column headerValue="Category">

                    <apex:inputField value="{!a.Category__c}"  />

                </apex:column>

                <apex:column >

                   

                    <apex:outputtext id="dynamictext"   />

                 </apex:column > 

                <apex:column headerValue="Description">

                    <apex:inputField value="{!a.Description__c}" />

                </apex:column>

</apex:pageBlockTable>

 

In above code snippet, when we select value of Category__c some value ,dynamic help text would be displayed in the dynamictext-ouput text.... It should be ajax enabled no postback allowed

 

Pls help me how to achieve it.

I need help on below requirements  

 

1)      I have a standard page layout where one pull down menu called ‘status’ , If status values has been  changed as ‘approve’(and click save) then we need to redirect this page layout to new records type(page layot)

 

2)       Is it possible to add page layout content in another pagelayout top?

 

Thanks in advance

Anyone can help on the below requirements

 

I have a page layout for custom object. In this page layout, had related list to add values to the child object.

As of now single child record would be created at a time by clicking the save button in the page layout .

Now Requirement is to add multiple child records at a single shot of button click in the page layout.  So I thought of going with VF page for related list in the page layout

 

How we can do this?

1) How to pass page layout master object record information to VF child record add page?

2) How to add multiple child records at a single shot of button click?

 

I have created a profile with View all/Modify all permission for a custom object. However OWD setting for the particular custom object set it as private.

 

In this scenario,profile user can able to view/modify all the data's of that custom object ?

 

Do we have any design pattern for salesforce data(model) accessing.

 

In .NET we do have enterprise library to access the data model.. here we have such design patterns

<apex:page sidebar="false" showheader="true">
<script type="text/javascript">
function link()
{
window.location= 'https://c.ap1.visual.force.com/apex/helloworld';
}
</script>
<apex:form id="new">
	<apex:commandButton styleClass="groovybutton" onclick="link();" id="button1" value="commond button"/>
	<input type="button" name="groovybtn1" onclick="link()" class="groovybutton" value="HTML button"/>
</apex:form>
</apex:page>

 

 

In the above code snippet


when i click the command button , page redirect is not happening. However, i click HTML button page redirect is happening.

please help me to fix it



 

 

Anyone can help me on design patterns for data access layer ?

 

I am going to develop e commerce custom cloud - customer portal

 

can I purchase only one 'Force.com One App' user License which costs me 15$/per month

 

Am I able to run the one ecommerce application by 15$/month?

 

Pls help on this..

 

We are planning to migrate an existing e commerce application into SFDC custom cloud.

 

So I can go with below requirements

 

1)Customer portal for e commerce users login and check out the products

 

2)SFDC login for admin user(one user is going to hold this role)

 

so can I purchase only one 'Force.com One App' user License which costs me 15$/per month

 

Am I able to run the one ecommerce application by 15$/month?

 

Many to many relationship is being created by junction objects , then below two options are possible to

create it ?

 

1)Object A Look up relationship--->Junction object <----Look up relationship Object B

 

 

2)Object A Master Detail relationship--> Junction object <--- Master Detail relationship Object B

We are planning to create an Ecommerce site by using force.com site

 

1) How many authenticated user allowed in the customer portal. Around 1000 users required for my Ecommerce site

2) I don’t required more than one user licence for Foce.com login.

 

Anyone can help me what would be the cost or which license have to go ?

Could i get any free app for ecommerce site ?

We are planning to create an Ecommerce site by using force.com site

 

1) How many authenticated user allowed in the customer portal. Around 1000 users required for my Ecommerce site

2) I don’t required more than one user licence for Foce.com login.

 

Anyone can help me what would be the cost or which license have to go ?

Use case:- upload csv file to 3rd party site.

 

I am facing issues with http file post (.csv file) along with some parameters (email, Sid…).

 

It would be great if suggest some idea pseudo code or code snippet . Pls refer my code and correct me where I am not able to post file.

 

 

--------------------------------------------------------------

<!--  String postbody;
//Post body
//String boundary = '__boundary__1234454545445xxx';
String boundary = 'oMiJCBHGVvZmU7s3FcUGXMbyU23aX_Ow';
String queryheader = '--'+boundary+'\n';
String header = '--'+boundary+'\n'
+ 'Content-Disposition: form-data; name="file"; filename="'+filename
+'"\nContent-Type: application/octet-stream\n\n';
//+'"\nContent-Type: application/vnd.ms-excel\n\n';

String footer = '\n--'+boundary+'--';
//String footer = '\n--'+boundary;

String body = EncodingUtil.base64Encode(filebody); //encodes the blob into a base64 encoded String
//String body = filebody.toString();
//encodes the blob into a base64 encoded String

filecontent= header + filebody + footer ;


querybody= queryheader +'Content-Disposition: form-data; name="email"\n\n'+EncodingUtil.urlEncode('mail12345@gmail.com', 'UTF-8')+'\n';

querybody= querybody+queryheader +'Content-Disposition: form-data; name="sid"\n\n'+EncodingUtil.urlEncode('20', 'UTF-8')+'\n';

querybody= querybody+queryheader +'Content-Disposition: form-data; name="field"\n\n'+EncodingUtil.urlEncode('EMAIL:INITIALIZE', 'UTF-8')+'\n';


querybody= querybody+queryheader +'Content-Disposition: form-data; name="field"\n\n'+EncodingUtil.urlEncode('SID', 'UTF-8')+'\n';



postbody=querybody+filecontent;




/*********************************call API 2************************/
// content type:Content-Type: multipart/form-data; boundary=

HttpRequest req1 = new HttpRequest();
HttpResponse res1 = new HttpResponse();
Http http1 = new Http();


req1.setHeader('Content-type','multipart/form-data; boundary='+boundary);
//req1.setHeader('Content-type','multipart/mixed; boundary='+boundary);
req1.setHeader('Content-Disposition', 'attachment;filename='+filename);
//req1.setHeader('Content-type', 'application/vnd.ms-excel');
req1.setHeader('Cookie',setcookie) ;
req1.setMethod('POST');
req1.setEndpoint('https://mailpostingapi.com/cgi-bin/api/load1');
req1.setBody(postbody);
//req1.setBody('hi');
//req1.setCompressed(true);
//req1.setTimeout(60000);
req1.setHeader('Content-Length',String.valueof(postbody.length()));

try {
res1 = http1.send(req1);


if (res1.getBody().indexOf('err')>-1)
{
system.debug('***********error occured');
system.debug('********'+res1.getbody());
output_cookie2 =res1.getbody();

}
else

{
output_cookie2 =res1.getbody();
system.debug('*****su***'+res1.getbody());
}
System.debug('status'+res1.toString());
return null;
}

catch(System.CalloutException e)
{
System.debug('Callout error: '+ e);
System.debug(res1.toString());
return null;
} --->

 

I need help on below requirements  

 

1)      I have a standard page layout where one pull down menu called ‘status’ , If status values has been  changed as ‘approve’(and click save) then we need to redirect this page layout to new records type(page layot)

 

2)       Is it possible to add page layout content in another pagelayout top?

 

Thanks in advance

Anyone can help on the below requirements

 

I have a page layout for custom object. In this page layout, had related list to add values to the child object.

As of now single child record would be created at a time by clicking the save button in the page layout .

Now Requirement is to add multiple child records at a single shot of button click in the page layout.  So I thought of going with VF page for related list in the page layout

 

How we can do this?

1) How to pass page layout master object record information to VF child record add page?

2) How to add multiple child records at a single shot of button click?

 

I have created a profile with View all/Modify all permission for a custom object. However OWD setting for the particular custom object set it as private.

 

In this scenario,profile user can able to view/modify all the data's of that custom object ?

 

hi all,

 

i want to self-study salesforce admin adm201 course and then get certified. i would like to know where can i get the study material, work-books, manuals, youtube videos, itunes etc, etc for sfdc adm201 course. i found that sfdc developer study material is available at the link given below but not for sfdc admin.

 

http://wiki.developerforce.com/page/Documentation

 

thanks all

  • August 22, 2012
  • Like
  • 0

Do we have any design pattern for salesforce data(model) accessing.

 

In .NET we do have enterprise library to access the data model.. here we have such design patterns

<apex:page sidebar="false" showheader="true">
<script type="text/javascript">
function link()
{
window.location= 'https://c.ap1.visual.force.com/apex/helloworld';
}
</script>
<apex:form id="new">
	<apex:commandButton styleClass="groovybutton" onclick="link();" id="button1" value="commond button"/>
	<input type="button" name="groovybtn1" onclick="link()" class="groovybutton" value="HTML button"/>
</apex:form>
</apex:page>

 

 

In the above code snippet


when i click the command button , page redirect is not happening. However, i click HTML button page redirect is happening.

please help me to fix it



 

We are planning to create an Ecommerce site by using force.com site

 

1) How many authenticated user allowed in the customer portal. Around 1000 users required for my Ecommerce site

2) I don’t required more than one user licence for Foce.com login.

 

Anyone can help me what would be the cost or which license have to go ?

I'm getting the message 'Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.'  when running 'Force.com IDE Installer.exe' on my Windows 7 64-bit pc. This PC is in a corporate environment so I'm wondering if McAfee or a firewall may be the issue.

 

I've tried:

1. Installing Java, Eclipse.

2. Running as administrator.

 

 

 

 

 

 

 

what is the use of salesforce ID and how it would be maintain across different instances?

Hi SF Community,

 

I have four objects PO_Header,PO_Detail,GRN_Header,GRN_Detail.

 

A Master Detail relationship exists between PO_Header and PO_Detail and a second aster Detail relationship exists between GRN_Header,GRN_Detail.

 

Lookup Relations exists between PO_Header,GRN_Header and PO_Detail,GRN_Detail.

 

A GRN(Goods Receipt Note) is based on the PO(Purchase Order)

 

In GRN_Header page when I enter the PO No,The rest of the details from PO_Header like Vendor name,Org_name,PO_date etc.should be auto populated and in the GRN_details a few columns like the items ordered,Qty ordred should also be populated.

 

Can you help me with this.

 

Thanks,

Vjai

 


  • June 13, 2012
  • Like
  • 0

Pls help on the below question :-

Master Detail relationship :-

How many masters(Parents) are allowed on object ?

How many details (childs) are allowed on object ?

 

Lookup reationship :-

How many masters(Parents) are allowed on object ?

How many details (childs) are allowed on object ?

Please explain the practical scenario where we can use the below relationships in saleforce.com

 

secondly, I heard only about Look up and master details relationship that would be used for forming the one to many relationship, dont know how to implement One to One relationship and Many to many relationship

 

********************************

One to One relationship

One to many relationship

Many to many relationship

********************************

 

I have installed fore.com IDE as a standalone application, and also JVM already installed in my system. When i open Force.com IDE where i couldn’t find the ‘Force.com project’ Navigation.

In the File menu, I could find the below navigation to open the force.com project

File > New > Force.com Project

Hi All

 

I am getting one Error while setting up the Force.com IDE setup.

Im using the below environment:

 

os: Win 7 Ultimat

eclipse 3.6

jdk 1.6

 

I'm using the below link to setup.....

http://wiki.developerforce.com/page/Force.com_IDE_Installation_for_Eclipse_3.6

 

 

 This is the Error message I am getting:

 

An error occurred while collecting items to be installed

session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

Problems downloading artifact: osgi.bundle,com.salesforce.ide.api,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 7251ab037ae632a5a9835c7c07210451 and found a96928dbcb83c08611b77248301d61d7.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.core,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 44db36699ca7fdd38917fced4e63c3b3 and found 9844d8bd4982d545eb2f3bce5ab9099b.

Problems downloading artifact: osgi.bundle,com.salesforce.ide.documentation,24.0.0.201202291629.

MD5 hash is not as expected. Expected: 6d87eb2e76e7e19f7b709682e5272dfc and found f7753249029edee3a084bf32b0e764ff.

 

 

 

 

 

Thanks for the Help in advance.

Raja Lakki