• soni rajput
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 8
    Replies

Hi,

 

There is one custom object which is a parent and task is child.

I have created a visual force page for filling custom object info
(Parent) and Child records info (Task).  Parents records can be more
than one because of this i am using batch

There is button on this page which will call a batch and that batch
which will insert parent object records and also child (Task records)
and in execute method we are collecting all the task in a list and
then upserting it. When we create recurring task then batch is
throwing error that "Apex Task trigger cannot handle batch operations
on recurring tasks."

For resolving this error i have created another batch to insert  task
record and instead of inserting list of task in first i am calling
second batch to insert task record and
using second batch size "1".

After using second batch following error is coming " batch method
cannot call a batch or future method".

 

How to resolve this problem??

URGENT

Hi,

 

I have created a VF page and apex class. VF page if for creating task.

I am creating recurring task records through apex code and for this i want to calculate cmaximum end date of recurring task

based on selected frequency. 

How can i calculate max end date ? Urgent !!

 

Thanks,

Soni

Hi,

 

I am doing some web service based project and there are two salesforce instance, one is client instance (can be many) and other one is the server instance. On both instance there is similar custom object

 

I want that if a record of custom object is inserted on server instance then it should also be inserted on the client side immediately.

 

One possible solution might be a batch running on the client side, to read the new records (through web service) from the server instance and then insert into client instance but this will not insert data immediately. The batch could be scheduled to run every few hours.

 

Thanks,

Soni

Hi,

 

I am displaying a gantt chart of Project, Milestones and task using visual force page. For gantt chart i am using js Gantt jquery library.

My code is displaying chart properly now my problem is how to generate PDF of that chart.

 

 

Thanks,

Soni

Hi,

 

I am developing an app to launch on appexchange. There is a visual force page in my app

which is displaying a text box using this tag :- <input type="text" value="{!VenueName}" /> 

 

So for security review should i use some HTMLEncode or JSEncode method ?

 

Thanks,

Soni

Hi,

 

 I am using SwipeClock api12 (https://www.payrollservers.us/pg/api12.asmx) in salesforce. I am trying to call   GetOneTimeCredential api of swipeclock.

 GetOneTimeCredential accepts two parameter one is sessionid and another is targetLogin. 

 So the problem is what is targetlogin?

 

Thanks,

Soni

Hi,

 

I have created a flow in which there is an intermediate screen and few text fields. I have a conditional flow i.e if statement returns false, I need to execute the previous screen with all fields set to blank.

 

I tried the assignment step but no luck.

 

Please suggest some solution. 

 

Thanks,

Soni

 

Hi,

 

I am using Standard Rich Text Area. I am directy pasting the following code in text area

<img src="http://www.techgoondu.com/wp-content/uploads/2010/12/salesforce_logo.jpg" />

 

The problem is that when i am displaying rich Text field's value through <Apex:outfield> image not get displayed.

So how can i display image by directly inserting code in Rich Text Area field?

 

Thanks,

Soni

 

 

Hi,

 

I am using the follwing code in my visual force page

<script type="text/javascript">
              document.writeln("{!JSENCODE(ServerRecord.Description__c)}");
  </script>

Here ServerRecord.Description__c is a value which is coming from salesforce database.

So my problem is that the code given above is safe from XSS attack or not?

 

Thanks,

Soni

 

 

Hi,

 

I am developing a appExchange app. In this app i am using a text Editor and for displaying the data on visual force page i am using <apex:outputText escape="false" value="{!description}"/>. I have used escape="false"  because the description may contain images, text in any format and videos.

 

But Escape="False" attribute is giving an XSS Attack as a security error. How can i resolve this ? Any ideas ?

 

 

Thanks,

Soni

Hi,

 

I am going to launch an app exchange app but in my code i am using <apex: outputText escape="False"> and this line giving XSS attack issue.  So how to resolve this issue?

 

its Urgent.

 

Thanks,

Soni

Hi,

 

I am developing a visual force page which is calculating zip code through Reverse geocoding and Google Place api.

When i am using alert between the code then output is correct for array1 variable but if i remove all the alert then value of array1 is undefined. I don't want any alert in code.

 

Code snippt is given below

<apex:page id="pgId" showHeader="false" sidebar="false">
    

 
    <html>       
        <head>
            <script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>
            <script type="text/javascript" src="https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=true&libraries=places"></script>
            <script type="text/javascript">
                var array1;
                var map;
                var infowindow;
                var lat = 40.5998;
                var lng = -74.5542;
                var geo;
                function initialize() {
                    var pyrmont = new google.maps.LatLng(lat, lng);
                    map = new google.maps.Map(document.getElementById('map'), {
                        mapTypeId: google.maps.MapTypeId.ROADMAP,
                        center: pyrmont,
                        zoom: 15
                    });

                    var request = {
                        location: pyrmont,
                        radius: 120000,
                        types: ['store']
                    };
                      geo = new google.maps.Geocoder();
 
    
 
                    var service = new google.maps.places.PlacesService(map);
                    service.search(request, callback);
                }
 
                function callback(results, status) {
                     var geocoder;
                     var map;
                      var infowindow = new google.maps.InfoWindow();
                         var marker;
                    if (status == google.maps.places.PlacesServiceStatus.OK) {
                        for (var i = 0; i < results.length; i++) {
                           var s=results[i].geometry.location;
                           
                           alert(s);
                                  var la =s.lat();
                                  var ln =s.lng();
                                  alert(la);
                                   alert(ln);
                           geo = new google.maps.Geocoder();                           
                             alert(la+','+ln);
    var lat = parseFloat(la);
    var lng = parseFloat(ln);
    var latlng = new google.maps.LatLng(lat,lng);
    geo.geocode({'latLng': latlng}, function(res, status) {
      if (status == google.maps.GeocoderStatus.OK) {
   alert(res[1].formatted_address);
      var a=res[1].formatted_address;
      var u=a.indexOf(",");
     var n= a.lastIndexOf(",");

      var t = a.substring(u,n);

     var l = t.substring(t.lastIndexOf(","),t.length);
    var p = l.substring(4,l.length);
    alert(p);
      if(array1==null)
      array1 = p;
      else
      array1 = array1 + p + ';';
      alert(array1);
       
        if (res[1]) {
          
         alert(res[1].formatted_address);
        } else {
          alert("No results found");
        }
      } else {
        alert("Geocoder failed due to: " + status);
      }
    });                        
                        }
                        
                    }
                    alert(array1);
                    var url = '/apex/searcheventvf2?city=' + array1;
                    window.open(url, '_self', 'width=400,height=200');
                }

                google.maps.event.addDomListener(window, 'load', initialize);
            </script>
        </head>
        
        <body>
            <div id="map" style="display:none"></div>
           
        </body>
    
    </html>

</apex:page>

 

Thanks,

Soni

 

Hi,

 

I am embediing a visual force page on standard detail page of account and this visual force snippt is only showing one field of account. I want that this embedded account field should come in edit layout also. please help me how to do this?

 

Thanks,

Soni

Hi,

 

I am trying to get and edit the tabvisibilty and appVisibility of a profile object through apex code. 

Is it possible to do the same through Apex ?

 

Thanks

I have a Button for storing .vcf file in Document object. However, my requirement is to save that file in the system. 

Is it possible to download a file on clicking a Button in salesforce ?

 

Is the process of downloading a single or multiple file same ?

 

I have a problem in accesing the fields of a lookup .it means i m trying to access the fields of a lookup.

Lets say Stand opportunity is a custom object and has a lookup field to Account . So I am trying to access the fields of Account through Stand opportunity.

I am using stand_opportunity_Account__r_phone for accessing the phone number in mail merge template but it is not working

In mail merge template how to display the values of custom object??

a) Get a document (pdf or image) from a users desktop - store it somewhere (like Attachments or Documents). I have done this using a Visualforce page.b) Display this image part of a mail merge document.

We have a requirement to show an image or a PDF using Mail merge in Salesforce. If I have a lookup to an attachment, and the attachment contains an image or pdf, can that be displayed using Mail Merge
Basically our requirements are these -

how can i Add the content of stored pdf file to the mail merge template through code

How can we get the PDF of a word file programattically

Hi,

 

I am displaying a gantt chart of Project, Milestones and task using visual force page. For gantt chart i am using js Gantt jquery library.

My code is displaying chart properly now my problem is how to generate PDF of that chart.

 

 

Thanks,

Soni

Hi,

 

I am doing some web service based project and there are two salesforce instance, one is client instance (can be many) and other one is the server instance. On both instance there is similar custom object

 

I want that if a record of custom object is inserted on server instance then it should also be inserted on the client side immediately.

 

One possible solution might be a batch running on the client side, to read the new records (through web service) from the server instance and then insert into client instance but this will not insert data immediately. The batch could be scheduled to run every few hours.

 

Thanks,

Soni

Hi,

 

I am developing a appExchange app. In this app i am using a text Editor and for displaying the data on visual force page i am using <apex:outputText escape="false" value="{!description}"/>. I have used escape="false"  because the description may contain images, text in any format and videos.

 

But Escape="False" attribute is giving an XSS Attack as a security error. How can i resolve this ? Any ideas ?

 

 

Thanks,

Soni

Hi,

 

I am embediing a visual force page on standard detail page of account and this visual force snippt is only showing one field of account. I want that this embedded account field should come in edit layout also. please help me how to do this?

 

Thanks,

Soni

for(Order_Entry__c oe:oldOrderDetails)

{
if(oe.RecordTypeId==[Select Id from RecordType where Name='RKVZ' and SobjectType='Order_Entry__c'].Id)


if(oldOrderDetailMap.get(oe.Order_Number__c)==null)
{
oldOrderDetailMap.put(oe.Order_Number__c,new List<Order_Entry__c>{oe});
}
else
{
oldOrderDetailMap.get(oe.Order_Number__c).add(oe);
}
}

 

 

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

Error is pointing to the highlighted line.....I know I have written a SOQL inside a for loop....How do i get red of this now........Very Urgent

I have a Button for storing .vcf file in Document object. However, my requirement is to save that file in the system. 

Is it possible to download a file on clicking a Button in salesforce ?

 

Is the process of downloading a single or multiple file same ?