• SYED MOOSA NAZIR T N
  • NEWBIE
  • 35 Points
  • Member since 2014
  • salesforce.com Enthusiast
  • Wipro Technologies


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 13
    Replies
Hi All,

I have a VF page built on Lightning Design system (LDS) framework. When I add the renderAs="PDF" attribute, pdf does not show the content with LDS CSS/Style.
Reference Link: https://github.com/salesforce-ux/design-system/issues/341

Note1: apex:page tag has all the usual attributes which is required for pdf (showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" applyHtmlTag="false" applyBodyTag="false")

Note2: Salesforce supports external stylesheet. That is, CSS file stored in Static resource. URL for example:https://developer.salesforce.com/page/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce

I also copied the whole css content from the LDS CSS file (Path: 'assets/styles/salesforce-lightning-design-system-vf.min.css') and applied as inline CSS in VF page. But still, there is no luck.

My styleSheet is referred in VF page as below
apex:stylesheet value="{!URLFOR($Resource.SLDS221, 'assets/styles/salesforce-lightning-design-system-vf.min.css')}"

Page works absolutely fine if it is not rendered as PDF.
Also questioned in Stack Exchange: https://salesforce.stackexchange.com/questions/178572/visualforce-renderas-pdf-not-supporting-slds-css

Any suggestions guys??
Thanks,
Syed

Hi Folks,

I have got an interesting scenario in Salesforce SSO implementation.. Let me explain the scenario, so that you can help me to take it forward.. Your thoughts are most welcomed..

A MNC company is having multiple sub organizations. Each sub organizations maintains their employee details in a separate ADFS.
One sub organization implemeted Salesforce for their CRM activities. SSO is also implemeted for them by connecting with their ADFS.
Now Company decided to extend the Salesforce application usage to other Sub Organizations as well. And other sub organization employees need to have SSO (SP initiated). And their employee infos are maintained in different ADFS.  

As a Salesforce Consultant, how can we achieve SSO (SP initiated) in Salesforce for both the Sub Organization Users as their infos are maintained in different server?
How can we route for authentication?

Thanks Folks
Syed Moosa Nazir TN
smartmoosa@gmail.com

Hi Folks,

I would like to sync CONTACTS FROM OUTLOOK TO SALESFORCE (Not vice versa).
But In Configuration settings, I have only the following options,
1. Dont Sync
2. Salesforce to Outlook
3. Sync both ways

Requirement is to sync CONTACTS FROM OUTLOOK TO SALESFORCE.
How can we achieve this?

And one more doubt is, what is the time Frequency of the sync job?

Thanks Folks,
Syed Moosa Nazir TN
smartmoosa@gmail.com

What is the difference between "Static" and "Transient" variables with respect to VISUALFORCE Page only.
Both are aren’t transmitted as part of the view state for a Visualforce page. Then what makes difference?

Below is the sample code I have written to understand this concept. But not understanding the exact difference.

VF Page Code
<apex:page controller="ViewStateVFCon" action="{!Method1}">
<apex:form >
<apex:pageBlock id="pb">
<apex:pageBlockTable value="{!StaticVar}" var="Tab1">
<apex:column headervalue="Record ID">
<apex:outputText value="{!Tab1.id}"/>
</apex:column>
<apex:column headervalue="Record Name">
<apex:outputText value="{!Tab1.Name}"/>
</apex:column>
</apex:pageBlockTable>


<br/><br/><br/><br/><br/><br/><br/><br/><br/>


<apex:pageBlockTable value="{!transeintVar}" var="Tab2">
<apex:column headervalue="Record ID">
<apex:outputText value="{!Tab2.id}"/>
</apex:column>
<apex:column headervalue="Record Name">
<apex:outputText value="{!Tab2.Name}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>

<apex:commandButton action="{!Method2}" title="Refresh" value="Refresh" reRender="pb"/>
</apex:form>

</apex:page>

VF Controller
public with sharing class ViewStateVFCon {
    public static List<Account> StaticVar {get;set;}
    public transient List<Account> transeintVar {get;set;}
    public void Method1 (){
        system.debug('Action Method1 from Page Action==    ');
        StaticVar = [select id, name from Account limit 20];
        transeintVar = [select id, name from Account limit 20];
    }
    public pageReference Method2 (){
        system.debug('Action Method2 from Command Button==    ');
        return null;
    }
}

 

Thanks Folks..
Syed Moosa Nazir TN
smartmoosa@gmail.com

Hi All,
Why Role Field shows as MANDATORY but its not mandatory in User record creation.I do understand the Role Hierarchy and Record level access. My question is only about the MANDATORY line(Red Mark) while creating a USER record.

Thanks
Syed
 

Hi All,

I have a VF page built on Lightning Design system (LDS) framework. When I add the renderAs="PDF" attribute, pdf does not show the content with LDS CSS/Style.
Reference Link: https://github.com/salesforce-ux/design-system/issues/341

Note1: apex:page tag has all the usual attributes which is required for pdf (showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" applyHtmlTag="false" applyBodyTag="false")

Note2: Salesforce supports external stylesheet. That is, CSS file stored in Static resource. URL for example:https://developer.salesforce.com/page/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce

I also copied the whole css content from the LDS CSS file (Path: 'assets/styles/salesforce-lightning-design-system-vf.min.css') and applied as inline CSS in VF page. But still, there is no luck.

My styleSheet is referred in VF page as below
apex:stylesheet value="{!URLFOR($Resource.SLDS221, 'assets/styles/salesforce-lightning-design-system-vf.min.css')}"

Page works absolutely fine if it is not rendered as PDF.
Also questioned in Stack Exchange: https://salesforce.stackexchange.com/questions/178572/visualforce-renderas-pdf-not-supporting-slds-css

Any suggestions guys??
Thanks,
Syed
Hi all

I have a issue on my goal which is making problem .I have two object(Account and Object__c) both are in realtionship
In account object i have a picklist field with value(NEW and OLD).for example i have created a record in account object with picklist value NEW.
my rerquirment is when i will be create record on Object__c ,after creation of record the picklist value on Account object automatically changed to OLD.How it is possible.anybody have idea?
this schenario only meet when i select 1 record type
i am trying this by using process builder but failed.
do we only achieve this by trigger?
How do I write a code that deletes the right records if the record is idle for more than 180 days. Can anyone share me the code for this synario ??

Hi Folks,

I would like to sync CONTACTS FROM OUTLOOK TO SALESFORCE (Not vice versa).
But In Configuration settings, I have only the following options,
1. Dont Sync
2. Salesforce to Outlook
3. Sync both ways

Requirement is to sync CONTACTS FROM OUTLOOK TO SALESFORCE.
How can we achieve this?

And one more doubt is, what is the time Frequency of the sync job?

Thanks Folks,
Syed Moosa Nazir TN
smartmoosa@gmail.com

What is the difference between "Static" and "Transient" variables with respect to VISUALFORCE Page only.
Both are aren’t transmitted as part of the view state for a Visualforce page. Then what makes difference?

Below is the sample code I have written to understand this concept. But not understanding the exact difference.

VF Page Code
<apex:page controller="ViewStateVFCon" action="{!Method1}">
<apex:form >
<apex:pageBlock id="pb">
<apex:pageBlockTable value="{!StaticVar}" var="Tab1">
<apex:column headervalue="Record ID">
<apex:outputText value="{!Tab1.id}"/>
</apex:column>
<apex:column headervalue="Record Name">
<apex:outputText value="{!Tab1.Name}"/>
</apex:column>
</apex:pageBlockTable>


<br/><br/><br/><br/><br/><br/><br/><br/><br/>


<apex:pageBlockTable value="{!transeintVar}" var="Tab2">
<apex:column headervalue="Record ID">
<apex:outputText value="{!Tab2.id}"/>
</apex:column>
<apex:column headervalue="Record Name">
<apex:outputText value="{!Tab2.Name}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>

<apex:commandButton action="{!Method2}" title="Refresh" value="Refresh" reRender="pb"/>
</apex:form>

</apex:page>

VF Controller
public with sharing class ViewStateVFCon {
    public static List<Account> StaticVar {get;set;}
    public transient List<Account> transeintVar {get;set;}
    public void Method1 (){
        system.debug('Action Method1 from Page Action==    ');
        StaticVar = [select id, name from Account limit 20];
        transeintVar = [select id, name from Account limit 20];
    }
    public pageReference Method2 (){
        system.debug('Action Method2 from Command Button==    ');
        return null;
    }
}

 

Thanks Folks..
Syed Moosa Nazir TN
smartmoosa@gmail.com

Is it possible to create record under Emails related list in a case record whenever send email from custom vf page using apex.User-added image
In my salesforce org, whenever a lead is saved with LeadSource value as "Automation In Action", it automatically changes the LeadSource to "AE Generated" after about 30 minutes. I can't find from where it is getting changed. I checked the workflows, process and triggers except those in the managed packages. Is there any way to find from where the field update is getting triggered?

Thanks
Hello all,

I have these two trigger 
trigger InsertPriceBookTrigger on Order (before insert) { 
 List<Pricebook2> stdPBL =  [select id from Pricebook2 where IsStandard = TRUE];
 if(!stdPBL.isEmpty()){
  for(Order o: Trigger.new)
   o.PriceBook2Id = stdPBL[0].id;
  }
}

and 
 
​trigger TaskTrigger on Task (after insert) {
    List<Order> ordersToUpdate = new List<Order>();

    for(Task t : Trigger.new) {
        if(t.WhatId.getSObjectType() == Order.sObjectType 
            && t.Subject.startsWith('Email:')) {
                ordersToUpdate.add(new Order(Id = t.WhatId, Status = 'Sent'));
        }
    }

    update ordersToUpdate;
}

for these triggers created the following test class
 
@isTest
public class Test3{
    public static testmethod void InsertPriceBookTrigger_Test1()
    {
       Account a = new Account(
            Name = 'Test'

        );
        insert a;

        Order o = new Order(name='Test1',EffectiveDate=system.today(),status='draft');
        insert o;

    List<Pricebook2> stdPBL =  [select id from Pricebook2 where IsStandard = TRUE];

    if (!stdPBL.isEmpty())
    {
        system.assertequals(stdPBL[0].id,o.PriceBook2Id);
    }
    } 

    public static testmethod void TaskTrigger_Test1()
    {

            Order o = new Order(name='Test1',EffectiveDate=system.today(),status='draft');
            insert o;

        Task t = new Task(whatid=o.id,Priority = 'normal',status='open',subject='Email:xxxx');
        insert t;

        system.assertequals('Sent',o.status);
    }


}

It fails to cover the triggers. The error on the test history is :


System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Account Name:You must enter a value: []

Any ideas why?
List out or help me to learn saleforce intergration 

Hi All,

I have two custom objects lke Student__c(Detail) and Batch__c(Mater). Now whenever delete Batch__c record then delete associated detail records. i have created After Delete trigger on Batch__c with Master-Detail relationship on Student__c. But After trigger not firing on child and just simply delete master records only.
So what should i  do to delete Detail records whenever delete Master record.
 

trigger deleteBatch on Batch__c (After delete) {
    for(Batch__c bt:trigger.old){
    List<Student__c> stu  = [SELECT id FROM Student__c WHERE Id =: bt.id];
    delete stu;
    }   
}


Now my Question is: 1). Which relationship is required on Student__c whether it is Lookup or Master.
2). Can we delete Detail records whenever delete Master record using Lookup field on Detail object.
3) is there any relationship field required on Master object.

Please any one give me answers.

Thank you..
Nani
 

Hi Salesforce Gurus,

 

I want to know which relationship is maintained between Salesforce standard objects i.e Account, contact and Case Solution, Campaign lead, etc,... Is it Master detail relationship or look up relationship? One of my buddy having 6 years of experience in Salesforce.com said that "there is no such relationship is maintained in between Salesforce standard objects, These relationships are meant for only custom objects.." Is  it true?  If the relationship is Master detail, it will not follow few things, like master is mandatory while creating the contact record and if we delete account record contact record is not deleted, Could anybody explored on this?? If anybody came across please share a document or any URL saying about relationships for Standard objects in Salesforce.com. Thank you in advance!!

Hi

 

I am new about salesforce development.

 

I want a difference between inbound webservice and oubound webservice with an small example.

 

Thanks&Regards

Balu