• Gheorghe Sima 29
  • NEWBIE
  • 15 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 9
    Replies
Hi,

I have a visualforce page for salesforce1. I created cards for records and when I press to a card I want to call a function from the page's controller.
I put the event onclick on the div tag from visualforce but it does't work. 
This is my page:

User-added image

And this is the code:
<apex:form >
  <script type="text/javascript">
  function saveAddress(var id) {
    doSave(id);
  }
    </script>
  <apex:actionFunction name="doSave" action="{!save}" rerender="mypage">
      <apex:param name="addressId" value="" />
  </apex:actionFunction> 
  <div class="card-list context-account">
      <div class="card-list-heading">
        <h3>Detalii adrese</h3>
      </div>
      <apex:repeat value="{!address}" var="add" >
          <div class="card" onclick="saveAddress({!add.Adresa__c});">
            <div class="card-heading" >
              {!add.Adresa__r.Detalii_Adresa__c}
            </div>
            <ul class="card-detail ">
              <li><span class="sf1label">Judet:&nbsp;&nbsp; <apex:outputField value="{!add.Adresa__r.Judet_Sector__c}" /></span></li>
              <li><span class="sf1label">Oras:&nbsp;&nbsp; <apex:outputField value="{!add.Adresa__r.Oras__c}" /></span></li>
              <li><span class="sf1label">Tip Adresa:&nbsp;&nbsp; <apex:outputField value="{!add.Adresa__r.Tip_adresa__c}" /></span></li>
            </ul>
          </div>
    </apex:repeat>
  </div>
</apex:form>

Can someone help me?
Thanks!
Hi,

I made a visualforce page for salesforce1 but i have a problem when I open it in salesforce1 on Android.
When I open it on my Iphone I can do scroll sideways, but on Android it does not allow me to do scroll sideways. Can someone explain me why this happens?
Iphone images:

User-added image


User-added image

Android photo:

User-added image

Hi,

When a trigger fires it process the records modified by one user or more users? For example if 2 users edit one record each(from the same object) and click save in the same time then these 2 records will be processed in the same trigger execution or it will be 2 executions of the trigger?

If write userId = UserInfo.getUserId() in a trigger, what user id it will return?

Thanks!

Hi,
I wrote a trigger (before insert) which put the right record type on a custom object records. I'm using the Data Impord wizard to import these records ( in this step I have to select a record type for the records I want to import). Can someone explain me why my trigger doesn't override the record type selected on the import.( I selected to execute the triggers from the Import wizard).

Thanks!

Hi,

When a trigger fires it process the records modified by one user or more users? For example if 2 users edit one record each(from the same object) and click save in the same time then these 2 records will be processed in the same trigger execution or it will be 2 executions of the trigger?

If write userId = UserInfo.getUserId() in a trigger, what user id it will return?

Thanks!

Hi,

I have a visualforce page for salesforce1. I created cards for records and when I press to a card I want to call a function from the page's controller.
I put the event onclick on the div tag from visualforce but it does't work. 
This is my page:

User-added image

And this is the code:
<apex:form >
  <script type="text/javascript">
  function saveAddress(var id) {
    doSave(id);
  }
    </script>
  <apex:actionFunction name="doSave" action="{!save}" rerender="mypage">
      <apex:param name="addressId" value="" />
  </apex:actionFunction> 
  <div class="card-list context-account">
      <div class="card-list-heading">
        <h3>Detalii adrese</h3>
      </div>
      <apex:repeat value="{!address}" var="add" >
          <div class="card" onclick="saveAddress({!add.Adresa__c});">
            <div class="card-heading" >
              {!add.Adresa__r.Detalii_Adresa__c}
            </div>
            <ul class="card-detail ">
              <li><span class="sf1label">Judet:&nbsp;&nbsp; <apex:outputField value="{!add.Adresa__r.Judet_Sector__c}" /></span></li>
              <li><span class="sf1label">Oras:&nbsp;&nbsp; <apex:outputField value="{!add.Adresa__r.Oras__c}" /></span></li>
              <li><span class="sf1label">Tip Adresa:&nbsp;&nbsp; <apex:outputField value="{!add.Adresa__r.Tip_adresa__c}" /></span></li>
            </ul>
          </div>
    </apex:repeat>
  </div>
</apex:form>

Can someone help me?
Thanks!
Hi,

I made a visualforce page for salesforce1 but i have a problem when I open it in salesforce1 on Android.
When I open it on my Iphone I can do scroll sideways, but on Android it does not allow me to do scroll sideways. Can someone explain me why this happens?
Iphone images:

User-added image


User-added image

Android photo:

User-added image

Hi,

When a trigger fires it process the records modified by one user or more users? For example if 2 users edit one record each(from the same object) and click save in the same time then these 2 records will be processed in the same trigger execution or it will be 2 executions of the trigger?

If write userId = UserInfo.getUserId() in a trigger, what user id it will return?

Thanks!

Hi,
I wrote a trigger (before insert) which put the right record type on a custom object records. I'm using the Data Impord wizard to import these records ( in this step I have to select a record type for the records I want to import). Can someone explain me why my trigger doesn't override the record type selected on the import.( I selected to execute the triggers from the Import wizard).

Thanks!