• B_Bajaj
  • NEWBIE
  • 5 Points
  • Member since 2012

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

I have requirement where we are showing multiple pages in a sinlge parent page which has just <apex:include> which will looks something like below:
User-added image

User will have one edit button which should redirect him to input mode across all the pages/tabs. He can make the changes and he needs to click a save button on the parent page which will save all data across all the objects (approx 8-9 objects) in backhand. 

I have started the development of each page in parallel keeping the common controller to meet the deadline but at this moment main roadblock is "How to Save across all the tabs". I am not able to retain the values entered under each tab for different objects (each page) when trying access them in parent page.

Hi Everyone,

One of my client wants to import data into Salesforce directly from thier Excel template with a click of button. Is there any way to do it using Macro/Rest/Soap. Its quite a different requirement and I am not sure how to take it forward.

I believe Excel connector provides the same feature but just wanted to make sure that it works independly of other add-in/macro of excel as my client's Excel template has so many formulas and macro placed in already.

Any help is appreciated.!

Thanks,
Bhisham Bajaj
  • September 03, 2014
  • Like
  • 0
I want to show the stock market related info on the account detail page for that particular account. I can embed one VF snippet into detail page or can override whole detail page that is not a problem but it should be refreshed regularly to get live update related to the account. Not sure whether it is free or paid but I may opt the either way. Any help is appreciated.

Thanks in Advance.


Regards,
Bhisham Bajaj
Hi Everyone,

I am looking for a solution where I need to implement Apex Manged Sharing for a detail custom object whose master object is a standard object in my case it is account.

I have an object say Meetings which has master detail field which is set up with Account. I have done the apex managed sharing for a custom object but i am not sure how to proceed with this case. Few things I am curios about are
  • When there is no apex sharing reason for standard objects how to proceed.
  • There is no detail__Sharing (meeting__share in my case) then how to develop.
It will be helpful if you can provide a pusedo code for the same or a way to solve this.

Thanks in anticipation.

Thanks
Bhisham Bajaj

Hi Everyone,

 

I am trying to create a contact directory to show list of contacts along with their pics(from attachment). I want it to be get printed in Word document. I am facing two problems:

 

1. Images are not shown whereas it seems fine on visualforce page(without renderingas).

2.Page is getting downloaded as xyz.wiz whereas it should be xyz.doc

 

For 1st problem i have tried the following code:

 

Here wraplist is wrapper list having contact details along with attachment image

 

<apex:dataTable value="{!WrapList}" var="contact" width="100%" align="center" style="page-break-inside:avoid;">

<apex:column rowspan="2" style="page-break-inside:avoid;">
<small>


<table >

<tr style="page-break-inside:avoid;">
<td>
<apex:outputPanel rendered="{!if(contact.photo != null, true,false)}">

 

// here photo is a string equals '/servlet/servlet.FileDownload?file='+picMap.get(c.id).id;


<img id="theImage" src="{!contact.photo}" width="120" height="130" />  


</apex:outputPanel>
</td>

 

<td>
<style= "align: center;"/>
<b><apex:outputText value="{!contact.con.Name}"/></b><br></br>

</td>
</tr>
</table>
</small>

</apex:column>


</apex:dataTable>

 

Final output should be like following:

 

Image 1 : Contact1                                                                               Image 2: Contact2

Image 3 : Contact3                                                                               Image 4: Contact4

 

For second problem i have no idea how to resolve it: 

Only sometime it seems fine with crome rest of time format is not .doc

 

There is one other minor issue that when no of record are odd alignment for last records get disturbed. 

 

Any help will be appreciated. Thanks in Advance

 

Regards,

Bhisham Bajaj

 

"Your overall code coverage is currently 0%"

HUH? I was very unpleasantly surprised to find out, when I went to deploy my first custom class from SB to PROD, that my PROD is returning 0% code coverage (without my class!). This isn't possible... is it?

I am using out-of-the-box Salesforce with only one managed package: The Foundation's Nonprofit Start Pack v3. No custom code, repeat no code, no validations... the org is new. I have run all tests and I physcially see the majority of the managed TCs pass but it makes no difference at all. I just keep staring at 0% org wide coverage. I opened a CASE with SFDC Support and they turned me away. I went out to the forums and tried everything... Developer Console, Workbench... I have cleared the ApexCodeCoverage table and the ApexCodeCoverageAggregate table. I have compiled and recompiled... no difference. My zombie org sits at 0% code coverage and despite having only ONE custom class and TC in SB at 92% coverage... my hands are tied. I can't deploy anything.

PLEASE HELP.
I have the following trigger:
trigger HelloWorldTrigger on Book__c (before insert) {
    Book__c[] books = Trigger.new;
    MyHelloWorld.applyDiscount(books);
}
which calls the function in the follwoing class:
public class MyHelloWorld {
    public static void applyDiscount(Book__c[] books) {
        for (Book__c b: books) {
            b.Price__c *= 0.9;
        }
    }
}
but when I am running a test script:
@isTest
private class HelloWorldTestClass {
    static testMethod void validateHelloWorld() {
        Book__c b = new Book__c(Name='Behind the Cloud', Price__c=100);
        System.debug('Price before inserting new book: ' + b.Price__c);
        // Insert book
        insert b;
        // Retrieve the new book
        b = [SELECT Price__c FROM Book__c WHERE Id =:b.Id];
        System.debug('Price after trigger fired: ' + b.Price__c);
        // Test that the trigger correctly updated the price
        System.assertEquals(90, b.Price__c);
    }
}
its giving me a 0% code coverage
User-added image

Can anyone please help me with this?
  • December 10, 2015
  • Like
  • 0
Hi,
I am running the test class and getting the debug lines printed in the code also, but somehow the code coverage remains 0%. Any guesses why this is happening.

Thanks,
Yogesh
Hi Everyone,

One of my client wants to import data into Salesforce directly from thier Excel template with a click of button. Is there any way to do it using Macro/Rest/Soap. Its quite a different requirement and I am not sure how to take it forward.

I believe Excel connector provides the same feature but just wanted to make sure that it works independly of other add-in/macro of excel as my client's Excel template has so many formulas and macro placed in already.

Any help is appreciated.!

Thanks,
Bhisham Bajaj
  • September 03, 2014
  • Like
  • 0
I want to show the stock market related info on the account detail page for that particular account. I can embed one VF snippet into detail page or can override whole detail page that is not a problem but it should be refreshed regularly to get live update related to the account. Not sure whether it is free or paid but I may opt the either way. Any help is appreciated.

Thanks in Advance.


Regards,
Bhisham Bajaj
Hi Everyone,

I am looking for a solution where I need to implement Apex Manged Sharing for a detail custom object whose master object is a standard object in my case it is account.

I have an object say Meetings which has master detail field which is set up with Account. I have done the apex managed sharing for a custom object but i am not sure how to proceed with this case. Few things I am curios about are
  • When there is no apex sharing reason for standard objects how to proceed.
  • There is no detail__Sharing (meeting__share in my case) then how to develop.
It will be helpful if you can provide a pusedo code for the same or a way to solve this.

Thanks in anticipation.

Thanks
Bhisham Bajaj

On a standard SFDC page, user lookup fields have a drop down to the left of the input field where you can select "Standard User", "Partner User", etc (for examples, click the "Change Owner" link for any record). The drop down corresponds to the User.UserType field.

 

I have a VisualForce page where I have a user lookup <apex:inputField />. Of course, the UserType picklist isn't displayed for me, and when I search for a user, it's restricted to only Standard users. I need to be able to search and choose a Customer Portal user.

 

UPDATE

I just noticed that one of the URL parameters in the Lookup popup when I open it from my visualforce page is "lktp=StandardUserLookup". If I change the UserType picklist on the standard page to "Customer Portal", the parameter is "lktp=CustomerSuccessLookup". "CustomerSuccess" is the internal value for Customer Portal user types.

 

How can we change that parameter??