• new2force
  • NEWBIE
  • 54 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 32
    Replies

What is the general approach for having a force.com site host a JavaScript web app which communicates with the Salesforce via REST API?  Would I zip up the JavaScript, HTML and CSS files, upload them as a resource, then point to the main HTML file from a visual force page which is in the site?  What documentation would be good to read for this situation?

 

Thanks!

 

 

Hi

 

I have two record types in object called  " Location"

 

It had two record types "East"  and "West"

 

Only few users should see records created using record type West

 

I want users with profile A should see them and Profile B should not see them

 

in profile B, i removed  record type West. so when they are creating Location record, they are directly getting the page to create Location without giving them chance to select record type.thats fine.  But in the Location  tab they are seeing all Locations with record type West.

 

How do I prevent users with Profile B from seeing West record type records.

 

Thanku. sorry for big mail

 

 

Hi,

           I have been using IDE for long time  without any problems. 

 

     Today I thought i lost my IDE and tried to reinstall it. It asked me for lot off directories. and clicked Next for everything.  Finally, it got terminated. SThen I came to know that I didnt lost my IDE. opend it and opened  aclass and page. When I edited them and trying to save it is procucing this kind of error.

 

Save could not be completed.

 

Reason:

 

Could not write file: C:\Jobscience\Jobscience-SandBox\src\classes\LayoutClass.cls.

 

C:\Jobscience\Jobscience-SandBox\src\classes\LayoutClass.cls (Access is denied)

Hi everyone,

 

Iam trying to insert html template into VF page. Can u plz tell  me the way to do that

hey i created a custom HTML area and there i have to give custom VF page. right now , iam using frames like below

 

<br><iframe src="/apex/Example?core.apexpages.devmode.url=1" style="color: yellow;"  ="" width="100%" frameborder="0" height="100%"></iframe><br>

 

i dont wanna use frames. i want it without any scrolling. i did this using a reference. u can see how it produces output.

 

and also if it is the only way, then how can i write this code into production

Hi I have a login page in my sites in salesforce. the VF page takes username and Password as input aand in controller

 

Site.login(uname,pwd,<our destination page>) is working properly. now another organization wants to keep login page in their website and when they enter the details it should authenticate and take into the same destination page. here in sites, we will write necessaruy controls in controller. in the other website they r using php. there the contoller will be in action attubute of  form tag. Can someone help me out here.

 

 

Is this possible using WebServices?

 

 

Hi folks, iam new to sites. we have already  site whih is working good. but they want me to split the page which takes input from user so that it lessens the burden of suer. I exactly copying the code but it is not working.  for example, user logins into his account and its not retrieving any details from dtaabse even iam writing a query .to get data.

 

one more thing is iam opening the site and logging as an user . when i am closing that browser and reopening , it is still showing the previous user in development mode.  How to clear cookies or memory of browser in developer sandbox when usng sites.

 

If u I think my question is not clear,plz email me i will work on that. i have been faciong this since one week. but dont know how to ask

 

kindly let me know any websites which have advanced site examples.

 

Thanku

Hi, i am creating a custom visual force page and I want calendar popup or suggestion.

 

<apex:page standaqrdcontroller="Contact" extensions="infoControler">

 

<apex:inputField value="{!con.BirthDate}"/>

 

in controlller,

Contact con;

 

public void setCon(Contact newCon)

{

   con=newCon;

}

 

Iam not getting any popup calendar but todays date beside field is coming. I see in the Contact  Page when we click mouse inside the box, it is giving us calendar . but not in my case.

 

 

Can someone  help me out here .   Thanku

 

public Contact getCon()

{

  return con;

}

Hi we have a job portal  created using SItes .  we have lot of sources from where job seekers can come to our portal.  Now, I need to capture from which source the job seeker landed into our portal so that we can measure the efficiency of sources.

 

what Iam thinking is from URL, if the text contains letters like "dice" , we can add the source as dice.com. My concern here is when the job seekers com from dice to our portal , does the url contain the details about dice.

 

Can plz someone help me out here. Thanks in advance

Hi , iam new to SFDC and came to know u gus here help a lot. i have been facing this problem since three days.

 

Iam here trying to update Map value

 

Map<Id,Object> objMap=new Map<Id,Object>([select id,A,B from Object]);

 

for(Id tkId: taskIds)

{

        objMap.get(Trigger.newMap.get(tkId).whatId).A='Hi'  ;

}

 

update objMap; 

 

this is giving me the error. same kind of thing working for lists. but not for maps.

 

can u help me out here by looping thru the map and update one of the obejct values.

 

Note:   Trigger.newMap.get(tkId).whatId  gives me the Id in Map 

 

thanku.... rock with force........

Hi,

           I have been using IDE for long time  without any problems. 

 

     Today I thought i lost my IDE and tried to reinstall it. It asked me for lot off directories. and clicked Next for everything.  Finally, it got terminated. SThen I came to know that I didnt lost my IDE. opend it and opened  aclass and page. When I edited them and trying to save it is procucing this kind of error.

 

Save could not be completed.

 

Reason:

 

Could not write file: C:\Jobscience\Jobscience-SandBox\src\classes\LayoutClass.cls.

 

C:\Jobscience\Jobscience-SandBox\src\classes\LayoutClass.cls (Access is denied)

Hi everyone,

 

Iam trying to insert html template into VF page. Can u plz tell  me the way to do that

We would like to include parent fields to the "items to approve" dashboard component. Right now it is only possible to add fields which are related to the approval process itself. Apparantly the only way to do this is by using Visualforce.

 

 

 

Problem is that my knowledge of Visualforce is very limited. Could someone give me a little hand with this, try to push me in the right direction? Really appreciated!

 

 

Thanks!

hey i created a custom HTML area and there i have to give custom VF page. right now , iam using frames like below

 

<br><iframe src="/apex/Example?core.apexpages.devmode.url=1" style="color: yellow;"  ="" width="100%" frameborder="0" height="100%"></iframe><br>

 

i dont wanna use frames. i want it without any scrolling. i did this using a reference. u can see how it produces output.

 

and also if it is the only way, then how can i write this code into production

Hi I have a login page in my sites in salesforce. the VF page takes username and Password as input aand in controller

 

Site.login(uname,pwd,<our destination page>) is working properly. now another organization wants to keep login page in their website and when they enter the details it should authenticate and take into the same destination page. here in sites, we will write necessaruy controls in controller. in the other website they r using php. there the contoller will be in action attubute of  form tag. Can someone help me out here.

 

 

Is this possible using WebServices?

 

 

Hi folks, iam new to sites. we have already  site whih is working good. but they want me to split the page which takes input from user so that it lessens the burden of suer. I exactly copying the code but it is not working.  for example, user logins into his account and its not retrieving any details from dtaabse even iam writing a query .to get data.

 

one more thing is iam opening the site and logging as an user . when i am closing that browser and reopening , it is still showing the previous user in development mode.  How to clear cookies or memory of browser in developer sandbox when usng sites.

 

If u I think my question is not clear,plz email me i will work on that. i have been faciong this since one week. but dont know how to ask

 

kindly let me know any websites which have advanced site examples.

 

Thanku

Hi

 

Just lookig for a little advice.  On the Account object I have a related list - Call Reports.  I would like to create a custom button to add to this related list.  I need the button to get the Account Id and insert it in a URL and then launch the URL to a custom report I've created.  Can apex code be inserted in a URL? 

 

Thanks

 

  • April 07, 2011
  • Like
  • 0

I have created a custom tab called "engagements" where users can add minute minutes it also houses a custom object (related list) which they can click "add members" button and add contacts to this related list. The "Members" custom object currently has a look up going to contact and engagements.

 

I have also have created a look up relationship that connects it to "organizations". I have a related list in "organizations" that I am looking to have autopopulated once a "member" is added under engagements. I was told by developer support that I need to create a trigger but, don't know where to start.

  • April 07, 2011
  • Like
  • 0

Hi, i am creating a custom visual force page and I want calendar popup or suggestion.

 

<apex:page standaqrdcontroller="Contact" extensions="infoControler">

 

<apex:inputField value="{!con.BirthDate}"/>

 

in controlller,

Contact con;

 

public void setCon(Contact newCon)

{

   con=newCon;

}

 

Iam not getting any popup calendar but todays date beside field is coming. I see in the Contact  Page when we click mouse inside the box, it is giving us calendar . but not in my case.

 

 

Can someone  help me out here .   Thanku

 

public Contact getCon()

{

  return con;

}

Hi Folks!!


I have created a vf page using Account Satndard Controller. Here my Requirement is "Account_Type__C"((Custom Feild Picklist Type with Doctor/Chemist values). Save the Block of Info to Account Object dependin on the Selected Value.


Here no recordtypes its PE. So i have used javascript. Unable to Save Chemist Info coz the "Error: Required fields are missing: [Name]"

One more problem is while selecting product form lookup in chemist block it is get selected in Doctor Block instead of chemist. Why???????? it is always taking first feild into consideration....though i have used id's differently...


Please Suggest a better solution for this ASAP.


My Code is as Follows....

========================================================


<apex:page standardController="Account">
    <apex:form id="myFirstForm">
        <script src="/soap/ajax/18.0/connection.js"></script>
        <script type="text/javascript">
            window.onload = LoadDefaultData;
            sforce.connection.sessionId = "{!$Api.Session_ID}";
            function LoadDefaultData()
            {
                document.getElementById("{!$Component.myFirstForm.docpgblkid}").style.display= 'none';
                document.getElementById("{!$Component.myFirstForm.chempgblkid}").style.display= 'none';
                document.getElementById("{!$Component.myFirstForm.actionblockid}").style.display= 'none';
            }
            function GetSelectedAccountInfo()
            {
               var selectedaccounttype = document.getElementById("{!$Component.myFirstForm.acctypepgblkid.acctypepgblksecid.acctypeid}").value;
               if(selectedaccounttype=="")
               {
                    document.getElementById("{!$Component.myFirstForm.docpgblkid}").style.display= 'none';
                    document.getElementById("{!$Component.myFirstForm.chempgblkid}").style.display= 'none';
                    document.getElementById("{!$Component.myFirstForm.actionblockid}").style.display= 'none';
                    alert('Please Select An Account Type');                     
               }
               else if(selectedaccounttype=="Doctor")
               {
                    document.getElementById("{!$Component.myFirstForm.docpgblkid}").style.display= 'block';
                    document.getElementById("{!$Component.myFirstForm.chempgblkid}").style.display= 'none';
                    document.getElementById("{!$Component.myFirstForm.actionblockid}").style.display= 'block';
               }
               else if(selectedaccounttype=="Chemist")
               {
                    document.getElementById("{!$Component.myFirstForm.docpgblkid}").style.display= 'none';
                    document.getElementById("{!$Component.myFirstForm.chempgblkid}").style.display= 'block';
                    document.getElementById("{!$Component.myFirstForm.actionblockid}").style.display= 'block';                    
               }
            }
        </script>
        <apex:PageBlock id="acctypepgblkid">
            <apex:pageBlockSection id="acctypepgblksecid" title="Account Type Section">
                <apex:inputField id="acctypeid" value="{!Account.Account_Type__c}" onchange="GetSelectedAccountInfo()" >
                </apex:inputField>
            </apex:pageBlockSection>
        </apex:PageBlock>
        <apex:PageBlock id="docpgblkid">    
            <apex:pageBlockSection id="docbaseinfopgblksecid" title="Doctor Basic Information">
                <apex:inputField id="doctornameid" value="{!Account.Name}" required="false"/>
                <apex:inputField id="doctorcodeid" value="{!Account.Account_Code__c}"/>

                <apex:inputField id="productid" value="{!Account.Product__c}"/>
                <apex:inputField id="hospitalid" value="{!Account.Hospital__c}"/>
                <apex:inputField id="emailid" value="{!Account.Email__c}"/>
                <apex:inputField id="phonenoid" value="{!Account.Phone__c}"/>
            </apex:pageBlockSection>
        </apex:PageBlock>
        <apex:PageBlock id="chempgblkid">
            <apex:pageBlockSection id="chempgblksecid" title="Chemist Information" >
                <apex:inputField id="chemistnameid" value="{!Account.Name}" required="false"/>
                <apex:inputField id="chemistcodeid" value="{!Account.Account_Code__c}"/>
                <apex:inputField id="chemistproductid" value="{!Account.Product__c}"/>
                <apex:inputField id="chemistemailid" value="{!Account.Email__c}"/>
                <apex:inputField id="chemistphonenoid" value="{!Account.Phone__c}"/>
                <apex:inputField id="chemistdescid" value="{!Account.Description}"/>
            </apex:pageBlockSection>
        </apex:PageBlock>
        <apex:PageBlock id="actionblockid">            
            <apex:pageBlockButtons location="bottom" >
                <apex:commandButton id="btnSave" action="{!save}" value="Save"/>
                <apex:commandButton id="btnCancel" onclick="ClearFeilds()" value="Cancel"/>
            </apex:pageBlockButtons>
        </apex:PageBlock>
    </apex:form>
</apex:page>


========================================================


Thanks!!!!!!!!!

Sanjana.

I created two very simple triggers and tested them in a sandbox. I am not a developer, but put them together using suggestions from this board.  Trigger 1:  When a new contact is added to the Alumni Outreach object (through a lookup to the Contact record), a checkbox on the Contact record, Alumni_Outreach_Project__c, is checked.  Trigger 2:  Unchecks the checkbox when a contact's record is deleted from the Alumni Outreach object.  I tried to deploy them to Production using change sets and learned that I need to create an APEX class. 

 

Would anyone be able to help me get started with creating the class?  I'm not sure I'll be able to code this - do I need to create one class for each trigger? 

 

Any help would be appreciated.  Thanks

 

 

Trigger 1:

trigger AlumniOutreach_Check_Checkbox on Alumni_Outreach__c (after insert) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.new)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = true;
    updatedContacts.add(a);
    }
update updatedContacts;
}


Trigger 2:
trigger AlumniOutreach_UNCheck_Checkbox on Alumni_Outreach__c (after delete) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.old)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = false;
    updatedContacts.add(a);
    }
update updatedContacts;
}

I have created a visual force page(using setup>Develop>pages) and add this page to my site(using Develop>sites>MysiteName>Site visualforce pages>Edit>add  and save my visualforce page).

 

Visual force page:

 

 

<apex:page >
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
</apex:page>

 Then I have added Active site page of my site as, SiteTemplate. The coding of site template is below.

 

Site Template:

 

 

<apex:page showHeader="false" id="SiteTemplate">
  <apex:stylesheet value="{!URLFOR($Resource.SiteSamples, 'SiteStyles.css')}"/>
  <apex:insert name="header">
  </apex:insert>
  <apex:insert name="body"> 

<h1>My First Website<h1>
<a href="???">My Congratulations page</a>
</apex:insert>
<apex:insert name="footer">
<hr/>
<c:SiteFooter />
<site:googleAnalyticsTracking />
</apex:insert>
</apex:page>

 

My need is, If click on "My congratulations page" in my site page.....the Visual force page "Congratulations" should show......How to do this????......

 

Please clear my issue.......

 

 

 

I have a Developer Edition for development......

 

I plan to develop a site and give it to other Company (or) Organisation(Those are not having any idea about salesforce).......

 

Again I want develop another site, for another Organisation means, Shall i want to Create (or) sign up another Developer Edition.(because i know, in developer edition we can create only one site).......

can I access Accounts object from my site....

 

That is, I want to create the following in my Site.

Textbox for Account name,

ID Number Submit button

 

If i click on Submit from my site, A new Account will be created in salesforce Organisation Accounts Object with Account name, ID Number(I given in site).

 

Is it possible...if possible how to do this....

How to deploy my Sites..where i want to deploy......

 

Then what is the use of Site force and ISV force in force.com........

 

I have go through....In force.com.....siteforce home page shows only what is Siteforce and etc., only.....from where we go to next step.....either go to develop sites or anyother tools are available for creating siteforce separately.......

 

Also what is the use of ISV force...In that they said, fastest way to bring commercial applications to market.......Then what is the use of APPExchange.....why this much confusions........No continuity is there....My suggestion is It is very hard to understand for beginners.....

 

please clear my doubts.....After I create my site in developer Edition..how to give that site to others use.....Simply I give my site url is enough?.....

How to access database from my sites.

 

Actually I want to create a database in cloud platform. Then store some values.

 

Then get the values from my sites whenever i need.....is it possible.....

 

If possible how to do this....Please give step by step procedures and details..............for that can which language i want to use to access database from site.....can i use PHP......

 

Plz Help me.....

What is the general approach for having a force.com site host a JavaScript web app which communicates with the Salesforce via REST API?  Would I zip up the JavaScript, HTML and CSS files, upload them as a resource, then point to the main HTML file from a visual force page which is in the site?  What documentation would be good to read for this situation?

 

Thanks!

 

 

I want to create a site with Authentication.If i enter my site  url in browser first the login page should Display. After providing correct  credentials it will show my site pages........how to do this..........

 

I want to give only my site url to others. They dont have any salesforce login account or anything. They have only browser. they should enter the crediatials given by me and enter to the site.

 

i am using Developer Edition....Is it possible to do like this...........

 

Plz reply..i eagerly waiting for reply............