This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page StandardController="Contact" showHeader="true" sidebar="false"> | |
<script> | |
var pos = {}; | |
function success(position) { | |
pos = position.coords; | |
console.log(pos); | |
} | |
function error(msg) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author https://www.tostring.co.uk/custom-metadata-webservice-client | |
* @group Configuration | |
*/ | |
@SuppressWarnings('PMD.ApexDoc,PMD.FieldNamingConventions,PMD.LocalVariableNamingConventions,PMD.ClassNamingConventions,PMD.ExcessiveParameterList') | |
public inherited sharing class CustomMetadataClient { | |
static public Database.UpsertResult upsertMetadata(SObjectType objectType, Map<SObjectField, Object> record) { | |
return upsertMetadata(objectType, new List<Map<SObjectField, Object>>{ record })[0]; | |
} |