• damienmagnan
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 7
    Replies

I'm able to create an URL S-Control which allow to reach the creation page of an event in avoiding recordtype selection.

My working code :

{!URLFOR($Action.Activity.NewEvent, null,
[RecordType="012200000000LM6",
who_id=Contact.Id,
retURL=$Request.retURL], false)}


My problem :
When I do the same thing with a custom object, the intermediate recordtype selection page is coming.

My Question:
How can I use URLFOR (or another function) on custom objects in order to avoid recordtype selection page?

Hi everyone,

I would like to know what's the use of that ContactId column you can see in the User table. I can see it trhough Eclipse IDE, I can display it in the search layout columns but I can't modify it through SalesForce interface.

I'm in Enterprise Edition, and that column would be very useful for my work... How can I use it, display it and modify it through SalesForce ?


Thank you very much
Good morning everyone,

I have an issue with sandboxes... 3 weeks ago I synchronized the sandbox with the production, it notably added 1 user, modified another one and also modified authorizations and some tables, etc.

It all worked fine for like 2 weeks until monday where I had a problem that corrected itself directly, but now it's back and I don't know what to do.

So the problem is that when I log on using my user account, I arrive on the old Sandbox, the one I had before synchronizing and the URL reads cs1.salesforce.com.
Now, if I log on with the account that wasn't there before the synchronization, I obtain the good SandBox, the address cs2.salesforce.com (that is the same as when my login was working correctly). I tried the logins and all the one that existed in the SandBox before the synchronization obtains the same result as mine...

Please help !
Thank you very much.
Hi again,

I have a problem with my inputText markups, it seems it doesn't want to save the datas I put in it.
I write the datas in the check box, press enter, it reloads the page, the datas are still displayed and that's cool.
But when I use my date picker to view another table with other datas and that I go back to the previous table, the datas I've written are lost, even though I'm saving all the tables I've opened. But it seems that the inputText doesn't use my setter methods.

Precisions : I'm using custom classes, no SalesForce sObjects and the datas are retrieved from another database via XML.

Does anyone have a clue for my problem ?
Okay I have a pageBlockTable that contains columns that contains inputText, I have a button that rerender the section that contains the table... However none of the value attribute of my input texts are reread from my database, it only recalls the designated methods when the apex statement (e.g. {!obj.value}) is in raw text. There is my code :

<apex:page id="rmaPage" controller="rmaController" title="Rapport Mensuel d'Activité">
<script src="/soap/ajax/11.1/connection.js" type="text/javascript">
</script>

<style>.colonne, .colonneWE {text-align:center;} .colonneWE {background-color:#D3D3CA;}</style>
<apex:form id="mainForm">
<!-- Should be splited -->
<apex:pageBlock id="exception" title="Exception" rendered="{!renderException}">
<apex:outputLabel >
<b>Type : </b>{!exc.type}</apex:outputLabel>
<br />
<apex:outputLabel >
<b>Source : </b>{!exc.source}</apex:outputLabel>
<br />
<apex:outputLabel >
<b>Message : </b>{!exc.message}</apex:outputLabel>
<br />
<apex:outputLabel >
<b>Stack Trace : </b>{!exc.stackTrace}</apex:outputLabel>
<br />
<apex:outputLabel >
<b>Target site : </b>{!exc.targetSite}</apex:outputLabel>
<br />
</apex:pageBlock>
<apex:pageBlock id="debug" title="debug" rendered="{!renderDebug}">
<apex:outputLabel for="endPoint">
<b>End point</b>{!endPoint}</apex:outputLabel>
<br />
<apex:outputLabel for="xmlToParse">
<b>XML to parse</b>{!xmlToParse}</apex:outputLabel>
<br />
</apex:pageBlock>
<apex:pageBlock id="main" title="Rapport Mensuel d'Activité">
<apex:pageBlockSection id="identitySct" collapsible="false" title="Identité" columns="1">
<apex:pageBlockSectionItem id="nomSctItem">
<apex:outputLabel id="nomLbl" for="nom">
<b>Nom du salarié</b>
</apex:outputLabel>
<apex:outputText id="nom">{!itc.titre} {!itc.prenom} {!itc.nom}</apex:outputText>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="emailSctItem">
<apex:outputLabel id="emailLbl" for="email">
<b>E-mail</b>
</apex:outputLabel>
<apex:outputText id="email">{!itc.email}</apex:outputText>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection id="dateSct" title="Le choix dans la date" collapsible="false" columns="1">
<apex:pageBlockSectionItem id="chooseMonthSctItem">
<apex:outputLabel id="chooseMonthLbl" for="chooseMonth">
<b>Mois</b>
</apex:outputLabel>
<apex:selectList id="chooseMonth" value="{!selectMonth}" size="1">
<apex:selectOption itemValue="1" itemLabel="Janvier" id="Testeuh" />
<apex:selectOption itemValue="2" itemLabel="Février" />
<apex:selectOption itemValue="3" itemLabel="Mars" />
<apex:selectOption itemValue="4" itemLabel="Avril" />
<apex:selectOption itemValue="5" itemLabel="Mai" />
<apex:selectOption itemValue="6" itemLabel="Juin" />
<apex:selectOption itemValue="7" itemLabel="Juillet" />
<apex:selectOption itemValue="8" itemLabel="Août" />
<apex:selectOption itemValue="9" itemLabel="Septembre" />
<apex:selectOption itemValue="10" itemLabel="Octobre" />
<apex:selectOption itemValue="11" itemLabel="Novembre" />
<apex:selectOption itemValue="12" itemLabel="Décembre" />
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="yearSct">
<apex:outputLabel id="chooseYearLbl" for="chooseYear">
<b>Année</b>
</apex:outputLabel>
<apex:inputText value="{!selectYear}" />
</apex:pageBlockSectionItem>
<apex:commandButton id="dateSctBtn" reRender="rmaTbl" value="Valider" action="{!changeRma}" />
</apex:pageBlockSection>
<apex:pageBlockSection id="rmaSct" title="Date : {!month} {!year}" collapsible="false" columns="1">
<apex:pageBlockTable id="rmaTbl" value="{!itc.firstRma.lignes}" headerClass="colonne" var="act" frame="none" rowClasses="odd,even" title="RMA">
<apex:column headerValue="Affectation" width="100%">
<apex:outputText value="{!act.designation}">
</apex:outputText>
</apex:column>
<apex:column headerValue="1" styleClass="{!act.styleJour01}" headerClass="{!act.styleJour01}">
<apex:inputText value="{!act.jour01}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="2" styleClass="{!act.styleJour02}" headerClass="{!act.styleJour02}">
<apex:inputText value="{!act.jour02}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="3" styleClass="{!act.styleJour03}" headerClass="{!act.styleJour03}">
<apex:inputText value="{!act.jour03}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="4" styleClass="{!act.styleJour04}" headerClass="{!act.styleJour04}">
<apex:inputText value="{!act.jour04}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="5" styleClass="{!act.styleJour05}" headerClass="{!act.styleJour05}">
<apex:inputText value="{!act.jour05}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="6" styleClass="{!act.styleJour06}" headerClass="{!act.styleJour06}">
<apex:inputText value="{!act.jour06}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="7" styleClass="{!act.styleJour07}" headerClass="{!act.styleJour07}">
<apex:inputText value="{!act.jour07}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="8" styleClass="{!act.styleJour08}" headerClass="{!act.styleJour08}">
<apex:inputText value="{!act.jour08}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="9" styleClass="{!act.styleJour09}" headerClass="{!act.styleJour09}">
<apex:inputText value="{!act.jour09}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="10" styleClass="{!act.styleJour10}" headerClass="{!act.styleJour10}">
<apex:inputText value="{!act.jour10}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="11" styleClass="{!act.styleJour11}" headerClass="{!act.styleJour11}">
<apex:inputText value="{!act.jour11}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="12" styleClass="{!act.styleJour12}" headerClass="{!act.styleJour12}">
<apex:inputText value="{!act.jour12}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="13" styleClass="{!act.styleJour13}" headerClass="{!act.styleJour13}">
<apex:inputText value="{!act.jour13}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="14" styleClass="{!act.styleJour14}" headerClass="{!act.styleJour14}">
<apex:inputText value="{!act.jour14}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="15" styleClass="{!act.styleJour15}" headerClass="{!act.styleJour15}">
<apex:inputText value="{!act.jour15}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="16" styleClass="{!act.styleJour16}" headerClass="{!act.styleJour16}">
<apex:inputText value="{!act.jour16}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="17" styleClass="{!act.styleJour17}" headerClass="{!act.styleJour17}">
<apex:inputText size="2" onchange="setTotalForRow(this);">{!act.jour17}</apex:inputText>
</apex:column>
<apex:column headerValue="18" styleClass="{!act.styleJour18}" headerClass="{!act.styleJour18}">
<apex:inputText value="{!act.jour18}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="19" styleClass="{!act.styleJour19}" headerClass="{!act.styleJour19}">
<apex:inputText value="{!act.jour19}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="20" styleClass="{!act.styleJour20}" headerClass="{!act.styleJour20}">
<apex:inputText value="{!act.jour20}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="21" styleClass="{!act.styleJour21}" headerClass="{!act.styleJour21}">
<apex:inputText value="{!act.jour21}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="22" styleClass="{!act.styleJour22}" headerClass="{!act.styleJour22}">
<apex:inputText value="{!act.jour22}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="23" styleClass="{!act.styleJour23}" headerClass="{!act.styleJour23}">
<apex:inputText value="{!act.jour23}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="24" styleClass="{!act.styleJour24}" headerClass="{!act.styleJour24}">
<apex:inputText value="{!act.jour24}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="25" styleClass="{!act.styleJour25}" headerClass="{!act.styleJour25}">
<apex:inputText value="{!act.jour25}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="26" styleClass="{!act.styleJour26}" headerClass="{!act.styleJour26}">
<apex:inputText value="{!act.jour26}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="27" styleClass="{!act.styleJour27}" headerClass="{!act.styleJour27}">
<apex:inputText value="{!act.jour27}" size="2" onchange="setTotalForRow(this);" />{!act.jour27}
</apex:column>
<apex:column headerValue="28" styleClass="{!act.styleJour28}" headerClass="{!act.styleJour28}">
<apex:inputText value="{!act.jour28}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="29" styleClass="{!act.styleJour29}" headerClass="{!act.styleJour29}" rendered="{!act.show29}">
<apex:inputText value="{!act.jour29}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="30" styleClass="{!act.styleJour30}" headerClass="{!act.styleJour30}" rendered="{!act.show30}">
<apex:inputText value="{!act.jour30}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column styleClass="{!act.styleJour31}" headerClass="{!act.styleJour31}" rendered="{!act.show31}">
<apex:facet name="header">31</apex:facet>
<apex:inputText value="{!act.jour31}" size="2" onchange="setTotalForRow(this);" />
</apex:column>
<apex:column headerValue="Total">
{!act.total}
</apex:column>
</apex:pageBlockTable>
<apex:panelGrid>
<apex:panelgroup>
<apex:commandButton id="addLigneBtn" value="Ajouter :" onclick="ajouterLigne();" />
<apex:selectList multiselect="false" size="1" id="addLigne">
<apex:selectOptions value="{!optionsLignes}" id="selectOptions" />
</apex:selectList>
</apex:panelgroup>
</apex:panelGrid>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<script>
//var table = document.getElementById('rmaPage:mainForm:main:rmaSct:rmaTbl');
//alert(table.rows[1].cells[31].parentNode);//.getAttribute('value')) + parseFloat(table.rows[1].cells[5].firstChild.getAttribute('value')));
//table.rows[1].cells[31].innerHTML = "de la merde";

function setTotalForRow(input)
{
row = input.parentNode.parentNode;
setValueInLastCellOfRow(row, getTotalForRow(row));
}

function getTotalForRow(row)
{
var value = 0;
for(i = 1; i <= row.cells.length - 2; i++)
value += getValueInCell(row, i);

return value;
}

var add = "zut";
var number = 0;

function setValueInLastCellOfRow(row, value)
{
row.cells[row.cells.length - 1].innerHTML = value.toString();
}
function getValueInCell(row, column)
{
val = row.cells[column].firstChild.value;
ret = 0.0;
ret = parseFloat(val);
return (isNaN(ret)) ? 0 : ret;
}
</script>
</apex:page>

By the way, I'd like to generate those 31 columns dynamically, because 1. it's long to write each column (5 use a program to generate them but still...) 2. the number of columns vary 3. The class of the object "act" (that contains the days) contains about 288 lines only to give to the page the values it asks (the style of the column, the number in a box, etc.), I generate that too through a program but that's really annoying.

Thanks in advance.
I'm trying to access the components in my VisualForce using JavaScript to change the styles of the different elements, but I can't even access the elements themselves. And that's really really annoying.

For example that little code :


<script>
alert('{!$Component.testpage}');
alert(document);
alert(document.getElementById('{!$Component.testpage}'));
</script>


The successive messages are : "testpage", "[object HTMLDocument]", "null"...

Anyone can help pleaseeeeeee.


NB: that's a simple not-working example... I have a bigger work to do : showing/hiding rows in apex:pageBlockTable and in a drop down list on demand...
Hi everyone,

I have to build a table that represents an activity summary for a month. That is, I have up to 31 columns for each days in the month and a dozen lines for each type of activity, and for each line and column I have an input field.
Is that possible generate dynamically the column on page load ?

I would like to avoid copying/pasting 31 times the same column and also I would like to avoid creating an accessor method for each column.

It brings my second question : is that possible, in an visualforce "{! }" markup to call methods of the controller by passing the method one or more parameter ?

For example, I'd like a method valueForColumn(Integer index) that returns the value of the column "index" and put one column on my VF page that will be reproduced as much as I need with the value changing depending on the index of the column.

Thanks in advance.

I'm able to create an URL S-Control which allow to reach the creation page of an event in avoiding recordtype selection.

My working code :

{!URLFOR($Action.Activity.NewEvent, null,
[RecordType="012200000000LM6",
who_id=Contact.Id,
retURL=$Request.retURL], false)}


My problem :
When I do the same thing with a custom object, the intermediate recordtype selection page is coming.

My Question:
How can I use URLFOR (or another function) on custom objects in order to avoid recordtype selection page?

I'm trying to access the components in my VisualForce using JavaScript to change the styles of the different elements, but I can't even access the elements themselves. And that's really really annoying.

For example that little code :


<script>
alert('{!$Component.testpage}');
alert(document);
alert(document.getElementById('{!$Component.testpage}'));
</script>


The successive messages are : "testpage", "[object HTMLDocument]", "null"...

Anyone can help pleaseeeeeee.


NB: that's a simple not-working example... I have a bigger work to do : showing/hiding rows in apex:pageBlockTable and in a drop down list on demand...
I am getting javascript error (null object) message while referencing inputbox. 
 
Problem: Visualforce is adding "j_id0:FormName:txtFirstName" in the Id
 
 
Has anyone been able to use the {IF} in Word's mailmerge to conditionally include text based on a value returned from Salesforce?
 
For example:
{ IF «OPPORTUNITY_NUM_SVCS_DEFINED» <> "1" "Some conditional text." " " }
 
The example from Microsoft shows:
{ IF {MERGEFIELD Country \* Caps } <> "United Kingdom" "We offer special rates on travel to the British Isles." " " }
 
Which I have successfully used before.
 
  • November 05, 2007
  • Like
  • 0